ZOOKEEPER-3600:[WIP]support the complete Linearizability Read - #1137
Open
maoling wants to merge 2 commits into
Open
ZOOKEEPER-3600:[WIP]support the complete Linearizability Read#1137maoling wants to merge 2 commits into
maoling wants to merge 2 commits into
Conversation
maoling
commented
Nov 7, 2019
Member
- this is still a work in the progress,Plz don't review before removing the WIP tag
- more details in the ZOOKEEPER-3600
maoling
force-pushed
the
ZOOKEEPER-3600
branch
from
September 2, 2022 11:52
e69bcfe to
f7f347b
Compare
eolivelli
requested changes
Sep 2, 2022
eolivelli
left a comment
Contributor
There was a problem hiding this comment.
this work is interesting.
I missed any discussions on the mailing list
| int sync = 9; | ||
|
|
||
| // sync | ||
| int syncedRead = 10; |
Contributor
There was a problem hiding this comment.
why using 10 ? isn't it better to use 109 ?
| * @throws InterruptedException | ||
| * @since | ||
| */ | ||
| public CompletableFuture<ZNode> getData(ReadConsistencyMode readMode, final String path, Watcher watcher) throws KeeperException, InterruptedException { |
Contributor
There was a problem hiding this comment.
CompletableFuture is tricky, because there is no control over the thread that execute any callback/listener
it is appealing but I won't use it here, all the API is based on callbacks that are guaranteed to be executed in the ZK thread
| ORDERED_SEQUENTIAL_READ("Ordered Sequential Read"), | ||
| LINEARIZABLE_READ("Linearizable Read"), | ||
| LEASE_READ("Lease Read"), | ||
| DUMMY_READ("Dummy Read Used For Testing"); |
Contributor
There was a problem hiding this comment.
we should remove this DUMMY_READ mode
| && (maxReadBatchSize < 0 || readsProcessed <= maxReadBatchSize) | ||
| && (request = queuedRequests.poll()) != null) { | ||
| requestsToProcess--; | ||
| //System.out.println("fuck__CommitProcessor_needCommit(request):" + needCommit(request) + ",pendingRequests.containsKey(request.sessionId):"+ |
Contributor
There was a problem hiding this comment.
please do not commit this lines or put them in PRs
they are sent over the mailing lists and tracked in the archives
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.