ZOOKEEPER-4269: acceptedEpoch.tmp rename failure will cause server startup error#1664
Closed
arshadmohammad wants to merge 3 commits intoapache:masterfrom
Closed
ZOOKEEPER-4269: acceptedEpoch.tmp rename failure will cause server startup error#1664arshadmohammad wants to merge 3 commits intoapache:masterfrom
arshadmohammad wants to merge 3 commits intoapache:masterfrom
Conversation
…artup error Using accepted epoch from acceptedEpoch.tmp if it is available
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java
Show resolved
Hide resolved
Contributor
Author
|
Added test case |
ztzg
requested changes
Mar 30, 2021
Contributor
ztzg
left a comment
There was a problem hiding this comment.
I must admit that I'm not quite on board with the idea of reading from .tmp files; this somehow goes against the idea of writing the file "atomically." I understand that these two small files are somewhat troublesome, though.
Independently of my feelings, the test should be updated to use the new JUnit 5 API in this branch.
...er-server/src/test/java/org/apache/zookeeper/server/quorum/CurrentEpochWriteFailureTest.java
Outdated
Show resolved
Hide resolved
...er-server/src/test/java/org/apache/zookeeper/server/quorum/CurrentEpochWriteFailureTest.java
Outdated
Show resolved
Hide resolved
...er-server/src/test/java/org/apache/zookeeper/server/quorum/CurrentEpochWriteFailureTest.java
Outdated
Show resolved
Hide resolved
ztzg
approved these changes
Mar 31, 2021
Contributor
ztzg
left a comment
There was a problem hiding this comment.
Okay, LGTM. (Still a bit queasy about these .tmp files.)
asfgit
pushed a commit
that referenced
this pull request
Mar 31, 2021
…artup error Using accepted epoch from acceptedEpoch.tmp if it is available Author: Mohammad Arshad <arshad@apache.org> Reviewers: Enrico Olivelli <eolivelli@apache.org>,Damien Diederen <dd@crosstwine.com> Closes #1664 from arshadmohammad/ZOOKEEPER-4269-master and squashes the following commits: d8ae084 [Mohammad Arshad] Handled review comments a2cc9a5 [Mohammad Arshad] Added test cases b56837e [Mohammad Arshad] ZOOKEEPER-4269: acceptedEpoch.tmp rename failure will cause server startup error Using accepted epoch from acceptedEpoch.tmp if it is available (cherry picked from commit cdddda4) Signed-off-by: Mohammad Arshad <arshad@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using accepted epoch from acceptedEpoch.tmp if it is available