-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ZOOKEEPER-3600:[WIP]support the complete Linearizability Read #1137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
maoling
commented
Nov 7, 2019
- this is still a work in the progress,Plz don't review before removing the WIP tag
- more details in the ZOOKEEPER-3600
e69bcfe to
f7f347b
Compare
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this work is interesting.
I missed any discussions on the mailing list
| int sync = 9; | ||
|
|
||
| // sync | ||
| int syncedRead = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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):"+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not commit this lines or put them in PRs
they are sent over the mailing lists and tracked in the archives