BP-41 Bookie Address changes tracking#2435
Conversation
- follow Bookie Address Changes - add flag enableBookieAddressTracking to enable/disable this feature
|
also @nicoloboschi @Ghatage PTAL |
|
gently nudging at @sijie @rdhabalia @jiazhai |
Ghatage
left a comment
There was a problem hiding this comment.
Overall LGTM.
Can you please explain the upgrade scenario for this?
As I understand, after upgrading the bits we can still use the older bookie id but if we want, we can start the bookies with BP-41 enabled, and then we have to restart the clients with it enabled too? Is that right?
| * flag to enable/disable bookie address changes tracking | ||
| * @return client configuration. | ||
| */ | ||
| public ClientConfiguration setEnableBookieAddressTracking(boolean enabled) { |
There was a problem hiding this comment.
nit: We can use this to enable/disable, so not sure if naming variable as enabled is clear. It could just be value
| } | ||
|
|
||
| private class BookieServiceInfoCacheInvalidationWatcher implements Watcher { | ||
|
|
There was a problem hiding this comment.
How frequently can a bookieID change? What factors drive its change?
There was a problem hiding this comment.
I see these known cases:
- a bookie with a dynamic network address
- changing configuration (change DNS name....)
- you change configuration and add new endpoints (this will happen in the future, when for instance @sijie will contribute the pure TLS endpoint)
So basically I think they won't change very ofter
If you don't configure the bookieId the bookie will work as it worked in 4.11, so no problem for old clients. If you want to leverage Bookie Address Change Tracking you have to:
We cannot set a bookieId by default in order to be backward compatible |
So can there be a case where we upgrade Bookies to 4.12 but disable this option and use the older I don't see it as a problem, just wondering if we also need to call it out and update the documentation for this in the 4.12 release. |
|
If you simply upgrade an existing cluster from 4.9/10/11 to 4.12 everything will work well. I am setting enableBookieAddressTracking=true by default because I think this is the future for BK and also in order to have all tests working with this feature. The case of enableBookieAddressTracking=false is to save resources on ZK, by reducing the number of watcher. If we were on ZK 3.6.x (client + server) we could leverage "Persistent Recursive Watches", that is a single watch for an entire tree of znodes, without the need to set it again after it triggers, and this will also mitigate the impact of these new additional watches |
|
@jiazhai @rdhabalia Please help me merging this patch |
This is part of BP-41
Master ticket #2396