cfzjywxk
079e2dce4e
txn: support read-consistency read with tso checking ( #447 )
...
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
2022-03-08 10:31:03 +08:00
disksing
e5f932ae27
txnkv: fix the issue that deleteRange cannot use nil as endkey ( #429 )
...
Signed-off-by: disksing <i@disksing.com>
2022-02-24 15:51:38 +08:00
disksing
b7a3ace8e6
txnkv: add shortcut to get global timestamp ( #395 )
...
Signed-off-by: disksing <i@disksing.com>
2022-02-11 12:40:35 +08:00
MyonKeminta
b5eb031edd
Support setting assertions and receiving assertion errors for Prewrite requests ( #311 )
...
* support set assertion in 2pc mutation
Signed-off-by: lysu <sulifx@gmail.com>
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Receive assertion fail errors from TiKV
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add test log
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Remove verbose log
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* update kvproto
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add metrics counter for assertions
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Address some comments
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Try to optimize assertion for pessimistic transactions
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Fix panic on optimistic transactions
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add InitCheckExistence method for LockCtx
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Support assertion level
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Check assertion level before doing assertion on client side
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Test bitoperations of menBUfferMutations.Push
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add test for assertion in tikv
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Support run assertion test with unistore
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Fix test
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Fix license
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Fix test
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* export DeleteKey
Signed-off-by: ekexium <ekexium@gmail.com>
* Renaming DeleteKey
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* fix build
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Address comments
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Avoid panic when running with old version of TiKV; Add schema check on fast assertion
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add test for fast assertion
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add test for pessimistic lock check existence
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Test assertion takes no effect if amending is enabled
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add HasAssertUnknown function
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add comments
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Cleanup locks after assertion fail
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* update tidb dependency
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Fix panic in TestIllegalTSO
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Address comments
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Add comments
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Update dependency to tidb
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
* Fix test
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: lysu <sulifx@gmail.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: ekexium <ekexium@gmail.com>
2022-02-10 15:31:32 +08:00
you06
62d6b4a2e8
txnkv: set TiKV RC for weak-consistency transactions ( #407 )
...
* add tikv-rc support
Signed-off-by: you06 <you1474600@gmail.com>
* add test
Signed-off-by: you06 <you1474600@gmail.com>
* format code
Signed-off-by: you06 <you1474600@gmail.com>
* address comment
Signed-off-by: you06 <you1474600@gmail.com>
* address comment
Signed-off-by: you06 <you1474600@gmail.com>
* update tidb && address comment
Signed-off-by: you06 <you1474600@gmail.com>
* update test log
Signed-off-by: you06 <you1474600@gmail.com>
2021-12-29 13:16:14 +08:00
Weizhen Wang
300275dee6
fix data race and panic when exiting ( #396 )
...
* fix the data race when exiting
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
* remove error and change log level
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
* add warn log
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Yilin Chen <sticnarf@gmail.com>
2021-12-23 14:21:59 +08:00
cfzjywxk
e9de5625c4
txn: change IsUnnecessaryKeyValue interface to report error for unexpected paths ( #390 )
...
* change IsUnnecessaryKeyValue interface to report error for unexpected situations
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
* update integrated tests go mod
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
Co-authored-by: disksing <i@disksing.com>
2021-12-20 20:12:11 -08:00
Yexiang Zhang
6165dbaa95
introduce RPC interceptor mechanism ( #389 )
...
* Add interceptor mechanism for tikv RPC
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Rename comment
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Modify comments
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix ineffectual assignment
Signed-off-by: mornyx <mornyx.z@gmail.com>
* add AddInterceptor for KVTxn and KVSnapshot
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Separate intercepor package
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Add comments
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Add order test
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix integration tests
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix integration tests
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Move interceptor call from client to client_collapse
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Add comments
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix comment
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Add client_interceptor
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Modify comment
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Add ut
Signed-off-by: mornyx <mornyx.z@gmail.com>
2021-12-18 13:03:06 +08:00
tiancaiamao
605f49d3ba
txnkv/transaction: add a kv option for cached table lock lease ( #392 )
...
Signed-off-by: tiancaiamao <tiancaiamao@gmail.com>
2021-12-14 01:37:15 -08:00
disksing
87c1c58064
move tikv.NewTxnClient to txnkv.NewClient ( #391 )
...
Signed-off-by: disksing <i@disksing.com>
2021-12-09 21:38:38 -08:00
Lei Zhao
c0e8766154
txnkv: decrease some max and base backoff time ( #388 )
...
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
2021-12-06 15:29:23 +08:00
Lei Zhao
3a7675742e
txnkv: read through locks ( #380 )
...
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
2021-12-01 16:35:10 +08:00
Yexiang Zhang
b11da6307c
txnkv: add ResourceGroupTagger for PessimisticLockRequest ( #381 )
...
* Add ResourceGroupTagger for PessimisticLockRequest
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix circular dependency
Signed-off-by: mornyx <mornyx.z@gmail.com>
2021-11-18 23:41:39 +08:00
cfzjywxk
e0bf24b24d
add newly inserted flag to optimize delete your write ( #378 )
...
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
2021-11-15 21:23:32 -08:00
Yexiang Zhang
3b9f591c3f
txnkv: add callback for setting ResourceGroupTag ( #368 )
...
* Replace resourceGroupTag with resourceGroupTagFactory(firstKey)
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix npe
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Abstract ResourceGroupFactory
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Optimized as ResourceGroupTagger
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Add test for resource group tagger
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix unexpected request failed in mock store
Signed-off-by: mornyx <mornyx.z@gmail.com>
* Fix integration tests
Signed-off-by: mornyx <mornyx.z@gmail.com>
Co-authored-by: Wenxuan <breezewish@pingcap.com>
2021-11-14 19:11:14 -08:00
Yilin Chen
6ac6a8daf2
Abort if the mismatching lock is from the current transaction when resolving locks ( #367 )
...
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2021-11-10 10:15:56 +08:00
disksing
9ec50224be
*: replace pingcap/errors with pkg/errors ( #357 )
...
Signed-off-by: disksing <i@disksing.com>
2021-11-01 11:59:52 +08:00
disksing
70c69a3fac
txnkv/txnsnapshot: remove errors.Trace usages ( #345 )
...
close #344
Signed-off-by: disksing <i@disksing.com>
2021-10-27 08:41:49 +00:00
disksing
5c06d9b19a
txnkv/rangetask: remove errors.Trace usages ( #349 )
...
close #346
Signed-off-by: disksing <i@disksing.com>
2021-10-27 08:36:00 +00:00
disksing
2d145163d0
txnkv/transaction: remove use of errors.Trace ( #351 )
...
Signed-off-by: disksing <i@disksing.com>
2021-10-27 10:13:37 +08:00
disksing
a5250aa7c4
txnkv/txnlock: remove errors.Trace usages ( #350 )
...
close #347
Signed-off-by: disksing <i@disksing.com>
2021-10-25 17:44:03 +08:00
disksing
49c8dd23f1
error: remove use of terror.ErrResultUndetermined ( #323 )
...
Signed-off-by: disksing <i@disksing.com>
2021-10-11 16:31:57 +08:00
Alkaid
128ccbde43
Add read throughput metric for SLI ( #321 )
...
Signed-off-by: jyz0309 <45495947@qq.com>
2021-10-11 11:46:20 +08:00
Song Gao
a8fa8acd44
rename txnScope as readReplicaScope ( #305 )
...
Signed-off-by: yisaer <disxiaofei@163.com>
2021-09-13 17:49:25 +08:00
lysu
4fc565e203
config: move resolve-lock-lite-threshold to tikv-client segment ( #297 )
2021-09-02 14:23:07 +08:00
lysu
eb7e4884a8
config: support config resolve lock lite threshold ( #291 )
...
Signed-off-by: lysu <sulifx@gmail.com>
2021-09-02 05:31:00 +00:00
Yilin Chen
16d902a3c7
reduce write backoffs but don't count busy errors ( #271 )
...
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2021-08-24 09:05:36 +00:00
lysu
0c8381cbc2
txnkv: fix delete temp table issue request to kv-server ( #281 )
...
Signed-off-by: lysu <sulifx@gmail.com>
2021-08-23 19:56:59 +08:00
MyonKeminta
ff94d0c9ac
txnkv: Fix a bug that OnDeadlock callback is called before setting `IsRetryable` field ( #274 )
...
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2021-08-20 13:16:08 +08:00
disksing
288c649636
fix license ( #267 )
...
Signed-off-by: disksing <i@disksing.com>
2021-08-15 01:48:01 +08:00
tier-cap
14892a598e
*: allow to custom disk_full_opt for transactions ( #256 )
...
Signed-off-by: tier-cap <zhengxiaojin@pingcap.com>
2021-08-06 16:56:16 +08:00
Yilin Chen
6f33dd97af
Start heartbeat immediately after locking the primary key ( #261 )
...
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2021-08-06 11:14:25 +08:00
disksing
d535b62b62
txnkv/transaction: init package ( #260 )
...
Signed-off-by: shirly <AndreMouche@126.com>
Co-authored-by: disksing <i@disksing.com>
2021-07-31 16:26:22 +08:00
Shirly
21ea47fe19
tikv: move temporary export types to package txnkv ( #258 )
...
Signed-off-by: shirly <AndreMouche@126.com>
2021-07-31 14:50:56 +08:00
Shirly
070dd85543
txnkv/txnsnapshot: init package for txnsnapshot ( #245 )
...
Signed-off-by: shirly <AndreMouche@126.com>
2021-07-27 12:10:35 +08:00
Shirly
654864ded8
txnkv/txnlock: init Lock in txnlock package ( #241 )
...
Signed-off-by: shirly <AndreMouche@126.com>
2021-07-21 15:03:08 +08:00
Shirly
0539869024
txnkv/*: init txnkv/rangetask package ( #234 )
2021-07-15 10:16:15 +08:00
disksing
2f09a0b49d
create v2 branch
...
Signed-off-by: disksing <i@disksing.com>
2021-06-10 19:44:46 +08:00
JmPotato
67fbdfbe14
Update the PD client version to eliminate performance regression ( #66 )
...
* Update the PD client version to eliminate performance regression
Signed-off-by: JmPotato <ghzpotato@gmail.com>
* Fix the mock
Signed-off-by: JmPotato <ghzpotato@gmail.com>
* Remove the unused dependency
Signed-off-by: JmPotato <ghzpotato@gmail.com>
* Remove unnecessary dependencies
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-01-25 18:27:38 +08:00
disksing
00eeab450c
*: update pd client dependency ( #62 )
...
Signed-off-by: disksing <i@disksing.com>
2020-11-17 11:13:22 +08:00
renzheng.wang
a72c652ef3
Delete some unused code ( #33 )
...
Signed-off-by: renzheng.wang <renzheng.wang@ucloud.cn>
2019-11-01 11:49:46 +08:00
disksing
72c56e71aa
txnkv: fix commit bug ( #27 )
...
Signed-off-by: disksing <i@disksing.com>
2019-07-12 15:28:02 +08:00
disksing
27e9cc92f4
*: better metrics support ( #24 )
...
* support push metrics
Signed-off-by: disksing <i@disksing.com>
* cleanup metrics and add grafana template
Signed-off-by: disksing <i@disksing.com>
* address comment
Signed-off-by: disksing <i@disksing.com>
* minor cleanup
Signed-off-by: disksing <i@disksing.com>
2019-06-28 00:37:58 +08:00
disksing
77a15fcd87
Use context everywhere ( #23 )
...
* rawkv
Signed-off-by: disksing <i@disksing.com>
* txnkv wip
Signed-off-by: disksing <i@disksing.com>
* txnkv wip
Signed-off-by: disksing <i@disksing.com>
* txnkv update get & batchGet
Signed-off-by: disksing <i@disksing.com>
* txnkv iterators
Signed-off-by: disksing <i@disksing.com>
2019-06-20 01:18:29 +08:00
disksing
940d55927c
config: cleanup and pass config as parameter ( #14 )
...
* config: cleanup and pass config as parameter
Signed-off-by: disksing <i@disksing.com>
* fix review comments
Signed-off-by: disksing <i@disksing.com>
* fix conflicts
Signed-off-by: disksing <i@disksing.com>
* address comment
Signed-off-by: disksing <i@disksing.com>
2019-04-19 17:01:34 +08:00
disksing
2130e26d4f
add code lint ( #10 )
...
* add code lint
Signed-off-by: disksing <i@disksing.com>
2019-03-27 11:41:47 +08:00
disksing
ea8b88134e
Move config variables to config package ( #9 )
...
* cleanup configurations
Signed-off-by: disksing <i@disksing.com>
2019-03-26 15:41:51 +08:00
disksing
970883c423
Replace pingap/errors with pkg/errors ( #8 )
...
* replace pingcap/errors with pkg/errors
Signed-off-by: disksing <i@disksing.com>
* get compiled
Signed-off-by: disksing <i@disksing.com>
* update meta.go
Signed-off-by: disksing <i@disksing.com>
* update txnkv.go
Signed-off-by: disksing <i@disksing.com>
* update codec.go
Signed-off-by: disksing <i@disksing.com>
* update region_cache.go
Signed-off-by: disksing <i@disksing.com>
* update mock.go
Signed-off-by: disksing <i@disksing.com>
* update txn_committer.go
Signed-off-by: disksing <i@disksing.com>
* update mvcc_leveldb.go
Signed-off-by: disksing <i@disksing.com>
* update rawkv.go
Signed-off-by: disksing <i@disksing.com>
* update snapshot.go
Signed-off-by: disksing <i@disksing.com>
* update lock_resolver.go
Signed-off-by: disksing <i@disksing.com>
* update scan.go
Signed-off-by: disksing <i@disksing.com>
* update region_request.go
Signed-off-by: disksing <i@disksing.com>
* update mvcc.go
Signed-off-by: disksing <i@disksing.com>
* update rpc.go, backoff.go client.go
Signed-off-by: disksing <i@disksing.com>
* update kv/*.go
Signed-off-by: disksing <i@disksing.com>
* update txn.go, pd.go
Signed-off-by: disksing <i@disksing.com>
* update txn/store/*
Signed-off-by: disksing <i@disksing.com>
* go mod tidy
Signed-off-by: disksing <i@disksing.com>
2019-03-21 11:01:52 +08:00
disksing
50aef7f485
remove duplicated codedPDClient ( #7 )
...
* remove duplicated codedPDClient
Signed-off-by: disksing <i@disksing.com>
2019-03-21 10:58:38 +08:00
disksing
a9347f9bec
add txnkv support and examples ( #6 )
...
* add txnkv support
Signed-off-by: disksing <i@disksing.com>
* add examples
Signed-off-by: disksing <i@disksing.com>
2019-03-18 19:47:54 +08:00
disksing
445fc2e42e
*: add oracles, latch, kv utils ( #5 )
...
* *: add oracles, latch, kv utils
Signed-off-by: disksing <i@disksing.com>
2019-03-14 11:28:54 -07:00