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

backport-2.1: storage: correctly handle empty forwarded proposals #31734

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

nvanbenschoten
Copy link
Member

@nvanbenschoten nvanbenschoten commented Oct 23, 2018

Fixes #31050.
Closes #31066.

The code assumed that an empty proposal would be a command ID with empty data, but it's also possible that the entire slice is empty (command IDs+data is our encoding; Raft itself emits an entry with completely blank data).

This is the backport of #31066, which no longer needs to be merged into master. The only changes in this PR are that I addressed my comments from #31066 (review).

Release note: None

@nvanbenschoten nvanbenschoten requested review from tbg and a team October 23, 2018 13:08
The code assumed that an empty proposal would be a command ID with empty
data, but it's also possible that the entire slice is empty (command
IDs+data is our encoding; Raft itself emits an entry with completely
blank data).

Fixes cockroachdb#31050.

Release note: None
Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

This divergence will be rectified in 2.1.1, right?

@nvanbenschoten
Copy link
Member Author

Yeah, exactly. As long as we don't find other issues with #31408.

@nvanbenschoten nvanbenschoten merged commit 142f1c6 into cockroachdb:release-2.1 Oct 23, 2018
@nvanbenschoten nvanbenschoten deleted the forward-npe branch October 23, 2018 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants