Extend the task future tracking to a Map instead of a single object.#1263
Merged
jiajunwang merged 1 commit intoapache:masterfrom Aug 13, 2020
Merged
Extend the task future tracking to a Map instead of a single object.#1263jiajunwang merged 1 commit intoapache:masterfrom
jiajunwang merged 1 commit intoapache:masterfrom
Conversation
Since the ZkBucketDataAccessor is used to access multiple paths, a single task future track is not enough. This change uses a map with the path as the key to track tasks for different paths. Also enhance the test case to cover the scenario of multiple paths being accessed in a short period.
NealSun96
approved these changes
Aug 13, 2020
Contributor
NealSun96
left a comment
There was a problem hiding this comment.
Looks good to me. Although I'm curious to know: if a path is updated on a frequent interval which is less than the TTL, its stale versions will steadily grow in size. Is that a case we would worry about?
Contributor
Author
The TTL design is to prevent GC a node that might being accessed by other threads/nodes. If update is frequent, then we may have multiple version during the TTL window. But they will eventually be cleaned up. |
Contributor
Author
|
This PR is ready to be merged. |
huizhilu
pushed a commit
to huizhilu/helix
that referenced
this pull request
Aug 16, 2020
…pache#1263) Since the ZkBucketDataAccessor is used to access multiple paths, a single task future track is not enough. This change uses a map with the path as the key to track tasks for different paths. Also enhance the test case to cover the scenario of multiple paths being accessed in a short period.
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 #1262
Description
Since the ZkBucketDataAccessor is used to access multiple paths, a single task future track is not enough. This change uses a map with the path as the key to track tasks for different paths.
Also, enhance the test case to cover the scenario of multiple paths being accessed in a short period.
Tests
TestZkBucketDataAccessor test method modified to test with multiple paths.
Helx-core
[ERROR] Failures:
[ERROR] TestP2PNoDuplicatedMessage.testP2PStateTransitionEnabled:174 expected:<2200> but was:<2196>
[INFO]
[ERROR] Tests run: 1163, Failures: 1, Errors: 0, Skipped: 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:20 h
[INFO] Finished at: 2020-08-12T21:25:40-07:00
[INFO] ------------------------------------------------------------------------
Re-run
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 98.501 s - in org.apache.helix.integration.messaging.TestP2PNoDuplicatedMessage
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:45 min
[INFO] Finished at: 2020-08-12T21:34:55-07:00
[INFO] ------------------------------------------------------------------------
Helix-rest
[INFO] Tests run: 165, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 130.89 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 165, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:19 min
[INFO] Finished at: 2020-08-12T21:38:32-07:00
[INFO] ------------------------------------------------------------------------
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)