Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit num pending proposals in apply channel #3340

Merged
merged 3 commits into from
Apr 30, 2019
Merged

Conversation

manishrjain
Copy link
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 as a code owner April 30, 2019 02:23
Copy link
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
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