Skip to content

Limit num pending proposals in apply channel#3340

Merged
manishrjain merged 3 commits intomasterfrom
mrjn/ramp-meter
Apr 30, 2019
Merged

Limit num pending proposals in apply channel#3340
manishrjain merged 3 commits intomasterfrom
mrjn/ramp-meter

Conversation

@manishrjain
Copy link
Copy Markdown
Contributor

@manishrjain manishrjain commented Apr 30, 2019

Add a ramp meter to avoid pushing too many big proposals to apply channel to prevent OOM.


This change is Reviewable

@manishrjain manishrjain requested a review from a team April 30, 2019 02:23
Copy link
Copy Markdown
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved

@manishrjain manishrjain merged commit 4d53eb8 into master Apr 30, 2019
@manishrjain manishrjain deleted the mrjn/ramp-meter branch April 30, 2019 02:36
manishrjain added a commit that referenced this pull request Apr 30, 2019
Add a ramp meter to avoid pushing too many big proposals to apply channel to prevent OOM.

Changes:
* Apply ramp meter before considering current proposal
* Add a log to warn if pending proposals exceeds the limit by two.
Copy link
Copy Markdown
Contributor

@codexnull codexnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


worker/draft.go, line 490 at r1 (raw file):

		}
		if sz := atomic.AddInt64(&n.pendingSize, -totalSize); sz < 0 {
			glog.Warningf("Pending size should remain above zero: %d", sz)

Is it harmless for the pending size to be below zero or does it indicate a more serious logic error somewhere?

dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
Add a ramp meter to avoid pushing too many big proposals to apply channel to prevent OOM.

Changes:
* Apply ramp meter before considering current proposal
* Add a log to warn if pending proposals exceeds the limit by two.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants