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