Fix bug in resetting ByteArrayZkClient#1531
Merged
narendly merged 1 commit intoapache:masterfrom Nov 17, 2020
Merged
Conversation
It was discovered that even though there was a routing data change, _byteArrayZkClient was not being created anew using the newly read routing data. This would cause issues with the zookeeper endpoints provided through Helix REST. This change cleans up some internal methods and ensures that the byte array zk client gets nullified every time there is routing data change.
junkaixue
reviewed
Nov 16, 2020
Contributor
junkaixue
left a comment
There was a problem hiding this comment.
Overall, it looks good to me. But could you elaborate more in description or in the issue? I am still confused to see why the byteArrayClient is not created could cause what kind of the problem? I am just confused about the how the clean up can solve the problem.
Contributor
Author
|
I added:
Let me know if this is clearer! |
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.
Issues
Fixes #1479
Description
It was discovered that even though there was a routing data change, _byteArrayZkClient was not being created anew using the newly read routing data. This would cause issues with the zookeeper endpoints provided through Helix REST. This change cleans up some internal methods and ensures that the byte array zk client gets nullified every time there is routing data change.
More specifically, the code was closing byteArrayDataAccessor but not byteArrayZkClient. This meant that the same byteArrayZkClient would be used even though everything was reset and routing data was updated. Hence, the data accessor was not really being created from scratch. This change makes sure that the underlying byteArrayZkClient gets closed and nullified upon routing data change.
Tests
TestRoutingDataUpdateDocumentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)