* 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>