Issue #2305: Bookies should not be allowed to come up without a cookie in metadata store.#2306
Conversation
|
Fix for #2305. |
|
Please check CI |
|
Hi @eolivelli, |
Currently we allow bookies to come up even if they don't have a cookie in the metadata store. The cookie is an identity of a registered bookie and a bookie should not be allowed to come up without it. Update handling of bookie boot up. Add test. This scenario is rarely expeced but can happen in case of corruption or errant deletion of znodes for cookies
ed0d832 to
5a90d73
Compare
merlimat
left a comment
There was a problem hiding this comment.
My concern here is that currently bookie is relying on this scenario for valid cases.
For example, the cookie is first written on local disk and then on ZK. If there's a failure in between, the bookie will currently be able to recover on next restart.
After this change, wouldn't this require manual intervention to fix?
|
Hi @merlimat! Yes you are right. If there is a failure in between writing the cookie to the disk and then to ZK, the bookie won't be able to restart as it will now throw an
If there is no cookie in ZK, any operations which involve reading the cookie from ZK, like decommissioning a bookie via decommission command or recovering a bookie via recover command will throw NPE / fail |
|
@ivankelly Any comments? |
… cookie in metadata store. ### Motivation Currently we allow bookies to come up even if they don't have a cookie in the metadata store. The cookie is an identity of a registered bookie and a bookie should not be allowed to come up without it. ### Changes Update handling of bookie boot up. Add test. This scenario is rarely expected but can happen in case of corruption or errant deletion of znodes for cookies Reviewers: Matteo Minardi <minardi.matteo@hotmail.it>, Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <None> This closes apache#2306 from Ghatage/disableBootup-Wo-Cookie, closes apache#2305
Motivation
Currently we allow bookies to come up even if they don't have a cookie in the metadata store.
The cookie is an identity of a registered bookie and a bookie should not be allowed to come up without it.
Changes
Update handling of bookie boot up. Add test.
This scenario is rarely expected but can happen in case of corruption or errant deletion of znodes for cookies