Skip to content
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

Merged
merged 28 commits into from
Feb 11, 2022
Merged

[to #348] Add examples to docs #453

merged 28 commits into from
Feb 11, 2022

Conversation

peng1999
Copy link
Member

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

  • No code

Check List for Tests

This PR has been tested by the at least one of the following methods:

  • No code

Side effects

  • NO side effects

Related changes

  • NO related changes

Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Comment on lines 49 to 53
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);
}
Copy link
Collaborator

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

Copy link
Collaborator

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.

docs/src/examples/quick-start.md Show resolved Hide resolved
docs/src/examples/quick-start.md Outdated Show resolved Hide resolved
docs/src/examples/quick-start.md Outdated Show resolved Hide resolved
peng1999 and others added 8 commits January 7, 2022 16:28
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>
@peng1999
Copy link
Member Author

peng1999 commented Jan 11, 2022

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>
peng1999 and others added 2 commits February 7, 2022 16:50
Signed-off-by: Peng Guanwen <pg999w@outlook.com>

Co-authored-by: Jian Zhang <zjsariel@gmail.com>
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,69 @@
# TxnKV
Copy link
Contributor

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?

Copy link
Member

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.

@andylokandy
Copy link
Contributor

rest LGTM

Signed-off-by: Peng Guanwen <pg999w@outlook.com>
@andylokandy
Copy link
Contributor

/merge

@ti-srebot
Copy link
Collaborator

/run-all-tests

@zz-jason zz-jason merged commit 4f13619 into tikv:master Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants