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

Port back recover related changes from twitter's branch #450

Closed
zhaijack opened this issue Aug 18, 2017 · 3 comments
Closed

Port back recover related changes from twitter's branch #450

zhaijack opened this issue Aug 18, 2017 · 3 comments
Labels
triage/18-w12 Issue triage, 2018 week 12 type/improvement

Comments

@zhaijack
Copy link
Contributor

In Distributedlog(apache/distributedlog#150), we temp comment out RecoverCommand in tools/DistributedLogTool.java, because the needed support is not ready here.
We may need to do the porting work from twitter's branch during 4.6.0.

@eolivelli
Copy link
Contributor

Is this an umbrella issue or it is just for a single port of code?

@sijie
Copy link
Member

sijie commented Aug 23, 2017

This is an umbrella issue.

@ivankelly
Copy link
Contributor

@sijie @zhaijack are these the autorecovery changes that need to come in from the twitter branch (honouring placement policy etc)? Can we uncomment RecoverCommand now?

@ivankelly ivankelly added triage/18-w12 Issue triage, 2018 week 12 type/improvement labels Mar 19, 2018
athanatos pushed a commit to athanatos/bookkeeper that referenced this issue Jan 25, 2019
…rs at startup

ZOOKEEPER-2967: Add check to validate dataDir and dataLogDir parameters at startup

This PR adds a check to protect ZK against configuring dataDir and dataLogDir opposingly.

When FileTxnSnapLog is created, it checks if transaction log directory contains snapshot files or vice versa, snapshot directory contains transaction log files. If so, the check throws LogdirContentCheckException or SnapdirContentCheckException, respectively, which translates to DatadirException at ZK startup in QuorumPeerMain and ZooKeeperServerMain.

If the two directories are the same, then no check is done.

For testing, I've added 4 new unit tests which cover the following cases:

1. transaction log and snapshot directories are different and they are used correctly (no Exception)
2. transaction log and snapshot directories are the same (in this case no check is done)
3. transaction log and snapshot directories are different and transaction log directory contains snapshot files (LogdirContentCheckException -> ZK quits)
4. transaction log and snapshot directories are different and snapshot directory contains transaction log files (SnapdirContentCheckException -> ZK quits)

Author: Mark Fenes <[email protected]>

Reviewers: Andor Molnár <[email protected]>, Abraham Fine <[email protected]>

Closes apache#450 from mfenes/ZOOKEEPER-2967 and squashes the following commits:

3f2ce609a [Mark Fenes] Re-run checks
3dba7f14a [Mark Fenes] ZOOKEEPER-2967: Add check to validate dataDir and dataLogDir parameters at startup
50e7150b3 [Mark Fenes] Trigger notification
5f8ada87f [Mark Fenes] ZOOKEEPER-2967: Add check to validate dataDir and dataLogDir parameters at startup
36fc5bd46 [Mark Fenes] ZOOKEEPER-2967: Add check to validate dataDir and dataLogDir parameters at startup
eb76730cb [Mark Fenes] ZOOKEEPER-2967: Add check to validate dataDir and dataLogDir parameters at startup
81c026fe8 [Mark Fenes] ZOOKEEPER-2967: Add check to validate dataDir and dataLogDir parameters at startup
@sijie sijie closed this as completed Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/18-w12 Issue triage, 2018 week 12 type/improvement
Projects
None yet
Development

No branches or pull requests

4 participants