Commit Graph

646 Commits

Author SHA1 Message Date
longfangsong 161433f7aa add primary_key field to TwoPhaseCommitter
Signed-off-by: longfangsong <longfangsong@icloud.com>
2021-01-08 13:44:48 +08:00
longfangsong d78d105807 move primary to buffer
Signed-off-by: longfangsong <longfangsong@icloud.com>
2021-01-08 13:43:16 +08:00
Nick Cameron 3392e6341b
Merge pull request #215 from ekexium/ignore-cargo-lock
Update dependency
2021-01-07 09:03:33 +13:00
ekexium 2a709116a6 update rand to 0.8
Signed-off-by: ekexium <ekexium@gmail.com>
2021-01-06 15:53:57 +08:00
ekexium c71ac8740c update fail, promethues, proptest
Signed-off-by: ekexium <ekexium@gmail.com>
2021-01-06 15:50:39 +08:00
ekexium c1bb955832 use tempfile to replace tempdir
Signed-off-by: ekexium <ekexium@gmail.com>
2021-01-06 15:46:23 +08:00
ekexium 684059a341 update grpcio to 0.7
Signed-off-by: ekexium <ekexium@gmail.com>
2021-01-06 15:32:28 +08:00
ekexium a8f52b9ba8 update tokio to 1.0
Signed-off-by: ekexium <ekexium@gmail.com>
2021-01-06 15:21:55 +08:00
ekexium 6b8b61fc79 ignore Cargo.lock
Signed-off-by: ekexium <ekexium@gmail.com>
2021-01-06 14:05:34 +08:00
Nick Cameron 2d657d74be
Merge pull request #213 from nrc/options
Refactor the transaction API re how we set options, and add some options to skip resolve and retry
2021-01-06 10:22:50 +13:00
Nick Cameron 3a29cb39a4 Address reviewer comments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-06 08:55:09 +13:00
Nick Cameron f90a82fe35 Add some docs and move try_one_pc out of options ctor
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron 1c7e843b54 Refactor the retry options
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron 5d584d93b3 Add option to not automatically resolve regions
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron 59b4a8d32b Add an option to not resolve locks on key locked errors
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron de9ca63dc9 Add transaction option for no retry
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron 0db6ab8923 Refactor Backoff
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron 304de84352 txn: rename TwoPhaseCommitter to Committer
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron 6dbaa74b32 Move code around in transaction.rs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron d71e34d8c7 txn: move read_only to options
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron b46022b7db Some renaming (and adds one method)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2021-01-05 14:48:57 +13:00
Nick Cameron 6c3b9a74f2
Merge pull request #214 from ekexium/resume-ci
CI: use nightly TiKV and PD images and run examples
2021-01-05 09:25:28 +13:00
ekexium 8828f9c93e run examples in CI
Signed-off-by: ekexium <ekexium@gmail.com>
2020-12-24 15:40:47 +08:00
ekexium 6e8eef7fcf fix examples
Signed-off-by: ekexium <ekexium@gmail.com>
2020-12-24 15:33:29 +08:00
ekexium da63451caf fix integration tests
Signed-off-by: ekexium <ekexium@gmail.com>
2020-12-24 15:20:00 +08:00
ekexium e9871d25c6 ci: use nightly
Signed-off-by: ekexium <ekexium@gmail.com>
2020-12-22 17:05:48 +08:00
Nick Cameron 0c7fd9594c
Merge pull request #211 from andylokandy/error
Use thiserror and rename Error to ClientError
2020-12-16 20:59:28 +13:00
Andy Lok 72ab9b3371 rename ClientError to Error
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-12-16 15:20:57 +08:00
Andy Lok e0e918ce2c remove useless into()
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-12-15 18:36:35 +08:00
Andy Lok 8f20f0c09e fix error
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-12-15 18:30:57 +08:00
Andy Lok 4873e6d605 Merge branch 'master' of https://github.com/tikv/client-rust into error
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-12-15 18:28:56 +08:00
Andy Lok d8887b054e apply clippy
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-12-15 18:22:39 +08:00
Andy Lok f9ab95ce62 Use thiserror and rename Error to ClientError
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-12-15 18:13:46 +08:00
Nick Cameron 0f505dd11c
Merge pull request #203 from nrc/async-commit
Initial work on async commit
2020-12-11 15:30:03 +13:00
Nick Cameron bf306d72cc
Merge branch 'master' into async-commit 2020-12-11 15:29:54 +13:00
Nick Cameron e2214eec38
Merge pull request #207 from humancalico/trs
make `new_pessimistic_lock_request` more consistent with `transaction::request`'s API
2020-12-10 15:18:37 +13:00
Akshat Agarwal 53325c73b0
make new_pessimistic_lock_request more consistent
Signed-off-by: Akshat Agarwal <humancalico@disroot.org>
2020-12-10 02:44:12 +05:30
Nick Cameron 93368a7fe0 Address review comments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2020-12-08 10:51:10 +13:00
Nick Cameron 9dcf298d87 Implement prewrite for async commit and 1pc
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2020-12-04 21:25:04 +13:00
Nick Cameron 5a06fd5582 Add try one pc to config
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2020-12-04 14:40:08 +13:00
Nick Cameron e346652b81 Refactor transaction to use TransactionStyle
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2020-12-04 14:34:45 +13:00
Nick Cameron a6df2d4b57 Update protos
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2020-12-04 14:21:02 +13:00
Nick Cameron 70dd5580f1
Merge pull request #202 from andylokandy/master
Allow unbounded start key
2020-11-26 15:59:20 +13:00
Andy Lok 9473bd5268 allow unbounded start key
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-11-25 17:58:32 +08:00
Nick Cameron ac96d14cfd
Merge pull request #201 from andylokandy/master
Improve ergonomics
2020-11-25 09:21:02 +13:00
Andy Lok 9cb904a499 split scan() into scan() and scan_keys()
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-11-24 17:45:11 +08:00
Andy Lok 1857ed2f83 Resturcture take2
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-11-23 21:48:41 +08:00
Andy Lok 0d66e23076 Merge branch 'master' of https://github.com/tikv/client-rust into HEAD 2020-11-23 19:27:44 +08:00
Nick Cameron ca8884f00e
Merge pull request #196 from ekexium/rollback
Fix: rollback and commit in transaction
2020-11-23 20:30:27 +13:00
Andy Lok 21a8dc43ad Merge from master
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-11-20 20:53:11 +08:00