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

raft: Really avoid scanning raft log in becomeLeader #9887

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

bdarnell
Copy link
Contributor

I meant to do this in #9073, but sent the PR before it was finished.
The last log index is known directly; there is no need to fetch any
entries here.

I meant to do this in etcd-io#9073, but sent the PR before it was finished.
The last log index is known directly; there is no need to fetch any
entries here.
@xiang90
Copy link
Contributor

xiang90 commented Jun 26, 2018

lgtm

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm thanks @bdarnell and @xiang90

@gyuho gyuho merged commit eb0a10d into etcd-io:master Jun 26, 2018
bdarnell added a commit to cockroachdb/vendored that referenced this pull request Jun 27, 2018
bdarnell added a commit to bdarnell/cockroach that referenced this pull request Jun 27, 2018
Release note (bug fix): Alleviate a scenario in which a large number of
uncommitted Raft commands could cause memory pressure at startup time.
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request Jun 28, 2018
27024: release-2.0: cherry-pick etcd-io/etcd#9887 r=tschottdorf a=bdarnell

This is the release-2.0 counterpart to #27009.

Release note (bug fix): Alleviate a scenario in which a large number of
uncommitted Raft commands could cause memory pressure at startup time.

Co-authored-by: Ben Darnell <ben@cockroachlabs.com>
tbg added a commit to cockroachdb/vendored that referenced this pull request Jul 19, 2018
tbg added a commit to tbg/cockroach that referenced this pull request Jul 19, 2018
Pick up etcd-io/etcd#9887, which avoids pulling the uncommitted portion
of the Raft log into memory.

Release note (bug fix): Alleviate a scenario in which a large number of
uncommitted Raft commands could cause memory pressure at startup time.
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request Jul 19, 2018
27009: vendor: bump etcd/raft to pick up memory usage fix r=bdarnell a=tschottdorf

Pick up etcd-io/etcd#9887, which avoids pulling
the uncommitted portion of the Raft log into memory.

Release note (bug fix): Alleviate a scenario in which a large number of
uncommitted Raft commands could cause memory pressure at startup time.

Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
Hoverbear pushed a commit to tikv/raft-rs that referenced this pull request Jul 31, 2018
Hoverbear pushed a commit to tikv/raft-rs that referenced this pull request Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants