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

ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch #1145

Closed
wants to merge 2 commits into from
Closed

ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch #1145

wants to merge 2 commits into from

Conversation

arshadmohammad
Copy link
Contributor

Update acceptedEpoch and currentEpoch in file first then in memory.

@maoling
Copy link
Member

maoling commented Nov 17, 2019

  • BTW, I also left a summary comment under ZOOKEEPER-335 to explain why introduced these two different variables:acceptedEpoch and currentEpoch to give users more contexts


Assert.assertEquals("acceptedEpoch must not have changed", 0,
quorumPeer.getAcceptedEpoch());
}
Copy link
Member

Choose a reason for hiding this comment

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

we also need assert currentEpoch here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if acceptedEpoch is 0 currentEpoch will be 0. But we can add assertion.
Added assertion for currentEpoch as well.

@asf-ci
Copy link

asf-ci commented Nov 23, 2019

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build-maven/1647/

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

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

+1 lgtm.

@asfgit asfgit closed this in 19d8567 Dec 17, 2019
@anmolnar
Copy link
Contributor

Merged to master. Thanks @arshadmohammad !

@arshadmohammad arshadmohammad deleted the ZOOKEEPER-2307-epochUpdate branch December 25, 2019 18:37
@rohitagl91
Copy link

Hi, which version of zookeeper will have this fix?

@anmolnar
Copy link
Contributor

anmolnar commented Feb 3, 2020

@rohitagl91 According to the jira: 3.6.0

@rohitagl91
Copy link

Thanks @anmolnar.. and do we have expected release date of 3.6.0?

@anmolnar
Copy link
Contributor

anmolnar commented Feb 3, 2020

RC1 is out. Feel free to vote for it. ;)

junyoungKimGit pushed a commit to junyoungKimGit/zookeeper that referenced this pull request Feb 7, 2020
…than the currentEpoch

Update acceptedEpoch and currentEpoch in file first then in memory.

Author: Mohammad Arshad <arshad@apache.org>

Reviewers: andor@apache.org

Closes apache#1145 from arshadmohammad/ZOOKEEPER-2307-epochUpdate and squashes the following commits:

b05bc1f [Mohammad Arshad] review comment fix
c8d620f [Mohammad Arshad] ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch
stickyhipp pushed a commit to stickyhipp/zookeeper that referenced this pull request Aug 19, 2020
…than the currentEpoch

Update acceptedEpoch and currentEpoch in file first then in memory.

Author: Mohammad Arshad <arshad@apache.org>

Reviewers: andor@apache.org

Closes apache#1145 from arshadmohammad/ZOOKEEPER-2307-epochUpdate and squashes the following commits:

b05bc1f [Mohammad Arshad] review comment fix
c8d620f [Mohammad Arshad] ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch
symat pushed a commit to symat/zookeeper that referenced this pull request Feb 24, 2021
…than the currentEpoch

Update acceptedEpoch and currentEpoch in file first then in memory.

Author: Mohammad Arshad <arshad@apache.org>

Reviewers: andor@apache.org

Closes apache#1145 from arshadmohammad/ZOOKEEPER-2307-epochUpdate and squashes the following commits:

b05bc1f [Mohammad Arshad] review comment fix
c8d620f [Mohammad Arshad] ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch

(cherry picked from commit 19d8567)
asfgit pushed a commit that referenced this pull request Feb 25, 2021
…than the currentEpoch

Update acceptedEpoch and currentEpoch in file first then in memory.

Author: Mohammad Arshad <arshadapache.org>

Reviewers: andorapache.org

Closes #1145 from arshadmohammad/ZOOKEEPER-2307-epochUpdate and squashes the following commits:

b05bc1f [Mohammad Arshad] review comment fix
c8d620f [Mohammad Arshad] ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch

(cherry picked from commit 19d8567)

Author: Mohammad Arshad <arshad@apache.org>

Reviewers: Andor Molnar <andor@apache.org>, Norbert Kalmar <nkalmar@apache.org>

Closes #1613 from symat/ZOOKEEPER-4222
@codekeyur
Copy link

@rohitagl91 According to the jira: 3.6.0

I think it wasn't fixed. I am running 3.6.1 got the same error "ERROR [main:QuorumPeer@1136] - Unable to load database on disk
java.io.IOException: The current epoch, 4, is older than the last zxid, 21474837049"

Is this resolved in 3.7 ?

RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Aug 31, 2022
…than the currentEpoch

Update acceptedEpoch and currentEpoch in file first then in memory.

Author: Mohammad Arshad <arshad@apache.org>

Reviewers: andor@apache.org

Closes apache#1145 from arshadmohammad/ZOOKEEPER-2307-epochUpdate and squashes the following commits:

b05bc1f [Mohammad Arshad] review comment fix
c8d620f [Mohammad Arshad] ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Sep 3, 2022
…than the currentEpoch

Update acceptedEpoch and currentEpoch in file first then in memory.

Author: Mohammad Arshad <arshad@apache.org>

Reviewers: andor@apache.org

Closes apache#1145 from arshadmohammad/ZOOKEEPER-2307-epochUpdate and squashes the following commits:

b05bc1f [Mohammad Arshad] review comment fix
c8d620f [Mohammad Arshad] ZOOKEEPER-2307:ZooKeeper not starting because acceptedEpoch is less than the currentEpoch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants