-
Notifications
You must be signed in to change notification settings - Fork 105
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
[to #348] Add examples to docs #453
Conversation
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
docs/src/examples/txnkv.md
Outdated
TiRegion region = session.getRegionManager().getRegionByKey(key1); | ||
try (RegionStoreClient client = session.getRegionStoreClientBuilder().build(region)) { | ||
client.prewrite(backOffer, key1, mutations, 10, startTS, false); | ||
client.commit(backOffer, commitKeys, startTS, commitTS); | ||
} |
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.
That's not how to write data to TxnKV.
Please refer to TwoPhaseCommitter
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.
The TwoPhaseCommitter API for writing data to TxnKV is too low level.
We should provide a high level API.
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com> Co-authored-by: Jian Zhang <zjsariel@gmail.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
A demo could be found at http://172.16.5.32:3001/ |
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com> Co-authored-by: Jian Zhang <zjsariel@gmail.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
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.
LGTM
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
@@ -0,0 +1,69 @@ | |||
# TxnKV |
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.
@zz-jason This is a little bit too low-level... Should we give example for txnkv?
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.
It's OK, we can update this document once there are easy ways to interact with transactions.
rest LGTM |
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
/merge |
/run-all-tests |
Signed-off-by: Peng Guanwen pg999w@outlook.com
What problem does this PR solve?
Issue Number: part of #348
Problem Description: Add examples to the documentation.
What is changed and how it works?
Code changes
Check List for Tests
This PR has been tested by the at least one of the following methods:
Side effects
Related changes