Do not create ZK paths if not needed#16816
Merged
kfaraz merged 3 commits intoapache:masterfrom Aug 6, 2024
Merged
Conversation
| true, | ||
| Execs.singleThreaded("ZkCoordinator") | ||
| ); | ||
| final String liveSegmentsLocation = ZKPaths.makePath(zkPaths.getLiveSegmentsPath(), me.getName()); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
| IndexIO.CURRENT_VERSION_ID, | ||
| 123L | ||
| final String liveSegmentsPath = ZKPaths.makePath( | ||
| zkPaths.getLiveSegmentsPath(), |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
| } | ||
| } | ||
| if (announceSegmentsOnZk) { | ||
| EasyMock.expect(mockCurator.newNamespaceAwareEnsurePath(liveSegmentsPath)) |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
AmatyaAvadhanula
approved these changes
Aug 6, 2024
Contributor
AmatyaAvadhanula
left a comment
There was a problem hiding this comment.
Thanks for the changes, @kfaraz! LGTM
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.
Background
ZK-based segment loading has been completely disabled in #15705 .
ZK
servedSegmentsPathhas been deprecated since Druid 0.7.1, #1182 .This legacy path has been replaced by the
liveSegmentsPathand is not used in the code anymore.Other changes
Upgrade considerations
Since ZK loadQueuePath will not be created any more by a server, there can be failures while loading
a segment during a rolling upgrade from Druid 29 (or older) to Druid 31.
These failures will happen only if using ZK-based segment loading. A coordinator on an older version
would try to create a ZK node to indicate to a server to load a segment. But the root path would not
exist since (being on a new version) the server would not have created the ZK path at all.
Release notes
In Druid 31, segment serving processes such as Peons, Historicals and Indexers will not create ZK loadQueuePath
anymore. The property
druid.zk.paths.loadQueuePathwill be ignored and should not be specified anymore.When upgrading to Druid 31, the recommended approach is to first move to HTTP-based segment loading
and then perform the version upgrade.
druid.zk.paths.servedSegmentsPathis not used anymore and is being removed.This PR has: