* Remove retry_response_stream
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Move store-related functions from request to store
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Be a little more consistent with the types in request ctor functions
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add request ctor functions taking high-level types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Refactor the command-abstraction into a composable plan abstraction
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support sending heartbeats automatically
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* nitpick
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Add heartbeat check
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Fix use
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* fix
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* fix complie errors
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Address review comments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* remove heartbeat plan and use spawn
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Fix build errors and replace RwLock
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Address review comments
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add unit test
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* nitpick
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* nitpick
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Fix deadlock and unit tests
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Add test for optimistic_heart
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Add mod.rs for tests
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Fix failpoint tests
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Address review comments
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Address review comments
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Address review comments
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Fix tests
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Fix clippy errors
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Address review comments
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Remove bg_worker
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
* Fix test
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* rename to failpoint_tests
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
* Update transaction.rs
* Update transaction.rs
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Andy Lok <andylokandy@hotmail.com>
* enable pessimistic_lock req to return values
Signed-off-by: ekexium <ekexium@gmail.com>
* refactor Mutation: Lock should be able to cache values
Signed-off-by: ekexium <ekexium@gmail.com>
* fix: read and lock operations should not override each other
Signed-off-by: ekexium <ekexium@gmail.com>
* rewrite get_for_update: make semantics similar to TiDB
Signed-off-by: ekexium <ekexium@gmail.com>
* fix: correctly set for_update_ts for pessimistic rollback request
Signed-off-by: ekexium <ekexium@gmail.com>
* fix: allow update_cache to 'update' existing keys, but check the values
Signed-off-by: ekexium <ekexium@gmail.com>
* test: add test for pessimistic rollback
Signed-off-by: ekexium <ekexium@gmail.com>
* doc: add some doc for get_for_update
Signed-off-by: ekexium <ekexium@gmail.com>
* fix: make batch_for_update private
Signed-off-by: ekexium <ekexium@gmail.com>
* resolve comments
Signed-off-by: ekexium <ekexium@gmail.com>
* ci: sleep a while to wait for PD
Signed-off-by: ekexium <ekexium@gmail.com>
* feat: lock_keys is available for both optimistic and pessimistic txns
Signed-off-by: ekexium <ekexium@gmail.com>
* refactor: rename ReadLockCached to CachedAndLocked
Signed-off-by: ekexium <ekexium@gmail.com>
* revert changes to `batch_get_for_update`
Signed-off-by: ekexium <ekexium@gmail.com>
* test: ignore unstable mock-tikv test
Signed-off-by: ekexium <ekexium@gmail.com>
* refactor: rename `ReadLockCached` to `Locked`
Signed-off-by: ekexium <ekexium@gmail.com>
* test: do not use Fallible
Signed-off-by: ekexium <ekexium@gmail.com>
* doc: update readme format
Signed-off-by: ekexium <ekexium@gmail.com>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Add codec for encoding region for transaction client. Fix some other bugs.
Signed-off-by: George Teo <george.c.teo@gmail.com>
Co-authored-by: ekexium <ekexium@gmail.com>
* Refactor the raw API to be command-oriented
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* WIP: provide mocks and use them for tests
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add proptest support
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* fmt
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Make proptest feature more consistent
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Fixes#69
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* fmt
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Refine CI
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Debug
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* debug
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Update windows path
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Correct switchdaemon
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Nocapture
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Merge before and script
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Try removing the travis cargo build cache
Signed-off-by: Brian Anderson <andersrb@gmail.com>
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Install protoc
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Add some dependencies
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Try to get windows to detect environment properly
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Sudo is disabled on linux
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Add updated ubuntu package
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Note why windows is disabled
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Correct pkg name
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Add mac dependencies
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Resolve lint
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Allow unused code in select places
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* fmt
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Use raft 0.5.0 branch
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Remove AppVeyor, don't need it.
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Initial version of Raw Kv client
Note: raw::Client::batch_scan is not implemented yet.
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* Document most public code.
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Reduce pub surface
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* fmt/lint
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Add cf to concrete builder types
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* Fixed some comments and confusing name
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* Change Request from struct to enum
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* Change tso_tx/rx channel to bounded
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* Fix format issues and improve implementations
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* Change to dyn trait syntax
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* inline some functions
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Better note on KvPair
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Use 3 PDs in raw example
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Clarify documentation
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Get CI green
Signed-off-by: Ana Hobden <operator@hoverbear.org>
* Remove not useful PrivateKey type
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
* Change CUSTOM_CF to "default" in examples/raw.rs
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>