Commit Graph

302 Commits

Author SHA1 Message Date
glorv 8c4189a0b1 update pd client
Signed-off-by: glorv <glorvs@163.com>
2023-12-27 13:00:23 +08:00
Weizhen Wang d0629e1f5a
*: upgrade grpc (#1086)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2023-12-22 13:52:32 +08:00
dependabot[bot] 993220962d
Bump golang.org/x/crypto from 0.16.0 to 0.17.0 in /integration_tests (#1080)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: disksing <i@disksing.com>
2023-12-21 11:52:28 +08:00
JmPotato 6f9ba8327b
Update the PD HTTP client to support source mark (#1081)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-12-19 13:21:37 +08:00
glorv e80e9ca1fe
resource_control: add ru details in ExecDetails (#1070)
* collecting the RU information by pasing point through context.Value (#1032)

Signed-off-by: zzm <zhouzemin@pingcap.com>

* add ruWaitDuration to RUDetails and update pd-client

Signed-off-by: glorv <glorvs@163.com>

---------

Signed-off-by: zzm <zhouzemin@pingcap.com>
Signed-off-by: glorv <glorvs@163.com>
Co-authored-by: zzm <zhouzemin@pingcap.com>
2023-12-04 15:40:48 +08:00
JmPotato 0336665e5f
Update TiDB version in the integration test (#1071)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-12-04 11:41:43 +08:00
Yongbo Jiang 0ff16620f6
pd client: uprade and fit get region option (#1069)
* fit get region option

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>

* replace tidb

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>

* replace tidb

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>

---------

Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
2023-12-01 10:44:04 +08:00
glorv 1c2351c281
resource_control: set override_priority with resource group priority by default (#1060)
* set override_priority with resource group priority

Signed-off-by: glorv <glorvs@163.com>

* update go.mod

Signed-off-by: glorv <glorvs@163.com>

* fix typo

Signed-off-by: glorv <glorvs@163.com>

* fix

Signed-off-by: glorv <glorvs@163.com>

---------

Signed-off-by: glorv <glorvs@163.com>
2023-11-16 13:17:30 +08:00
JmPotato 8fc8a52821
Refine the init method of PD HTTP client (#1058)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-11-14 14:09:55 +08:00
JmPotato 9caddec131
Update PD client to the latest version (#1056)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-11-13 14:11:07 +08:00
JmPotato 845e3b01a2
Support to integrate with the PD HTTP client (#1049)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
Co-authored-by: disksing <i@disksing.com>
2023-11-09 10:31:01 +08:00
Weizhen Wang 3520f13fc0
*: upgrade grpc and etcd (#1044)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2023-10-30 10:15:33 +08:00
xufei 76951801b9
save work (#1031)
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
2023-10-25 15:24:30 +08:00
xufei cad3142206
schedule async reload for region that has unavailable tiflash peers to avoid load un-balance issue (#1029)
Signed-off-by: xufei <xufei@pingcap.com>
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
2023-10-25 10:24:11 +08:00
dependabot[bot] ec40555fac
Bump golang.org/x/net from 0.15.0 to 0.17.0 in /integration_tests (#1014)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 14:15:39 +08:00
Hu# 652de4de2d
min-safe-ts: fix MinSafeTS might be set to MaxUint64 permanently (#994)
* fix

Signed-off-by: husharp <jinhao.hu@pingcap.com>

* refine test

Signed-off-by: husharp <jinhao.hu@pingcap.com>

* address comment

Signed-off-by: husharp <jinhao.hu@pingcap.com>

* refine test

Signed-off-by: husharp <jinhao.hu@pingcap.com>

---------

Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-10-09 10:08:55 +08:00
Hu# b535011f12
update fo mod (#995)
Signed-off-by: husharp <jinhao.hu@pingcap.com>
Co-authored-by: disksing <i@disksing.com>
2023-10-07 11:37:03 +08:00
bufferflies 94e94cb874
update kvproto
Signed-off-by: bufferflies <1045931706@qq.com>
2023-09-08 15:56:46 +08:00
husharp 5527f3dd0e address comment
Signed-off-by: husharp <ihusharp@gmail.com>
2023-09-01 17:33:32 +08:00
husharp ae859e2450 refine test
Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-09-01 15:28:18 +08:00
husharp 3c7fc08748 rebase gomod
Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-08-31 14:27:57 +08:00
husharp 75a9879730 merge master
Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-08-30 13:10:31 +08:00
buffer ff39b4af09
error: handle bucket version not match (#918) 2023-08-22 03:25:20 -06:00
husharp 97f9c1835b nit change
Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-08-21 10:26:21 +08:00
husharp cedc94b3ee use config instead
Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-08-16 15:59:30 +08:00
husharp 0930be96a5 remove ci
Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-08-02 18:40:29 +08:00
husharp c5bf330532 expand min-resolved-ts to support stores
Signed-off-by: husharp <jinhao.hu@pingcap.com>
2023-08-02 15:14:15 +08:00
Hu# 76d6d93e98
resource_manager: ignore ru metrics for background request (#872)
Signed-off-by: husharp <jinhao.hu@pingcap.com>
Co-authored-by: disksing <i@disksing.com>
2023-07-26 15:13:54 +08:00
Hangjie Mo 2f119351bd
*: add `SnapshotIterReverse` and make `iterReverse` supports `lowerBound` (#883)
Signed-off-by: Jason Mo <mohangjie1995@gmail.com>
2023-07-14 10:36:07 +08:00
MyonKeminta c0cf773917
Fix the issue that primary pessimistic lock may be left not cleared after GC (#866)
* Fix the issue that primary pessimistic lock may be left not cleared after GC

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix mysteriously shown up thing that makes compilation failed

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix test effectiveness (forgot to set txn2 to pessimistic txn); add more strict checks

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Address comments

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

---------

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-07-04 15:17:05 +08:00
glorv 18b17d4b72
fix rpc interceptor data race (#845)
Signed-off-by: glorv <glorvs@163.com>
2023-06-18 22:18:18 -07:00
glorv 0b4b0ca00e
kvrpc: deduplicate chained intercept by name (#832)
* dedup chained interceptor

Signed-off-by: glorv <glorvs@163.com>
2023-06-13 20:21:06 -07:00
crazycs df58452fe1
client_batch: add test for auto re-connect idle connection when wait connection ready and fix ci (#835)
* client_batch: add test

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix ci

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix ci

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix ci

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* update go version

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix ci

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix ci lint

Signed-off-by: crazycs520 <crazycs520@gmail.com>

* fix ci lint

Signed-off-by: crazycs520 <crazycs520@gmail.com>

---------

Signed-off-by: crazycs520 <crazycs520@gmail.com>
2023-06-13 14:17:17 +08:00
Yongbo Jiang 5ddc523cfc
*: update pd client version (#830)
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
2023-06-08 15:47:29 +08:00
Weizhen Wang d3c53d30ff
update dependency (#816)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2023-05-24 15:32:22 +08:00
MyonKeminta d1e188a981
Do not skip TestBatchResolveLocks for unistore (#807)
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-05-18 19:48:00 +08:00
Hu# adb48afeef
pd http: support api to get store min resolved ts (#793)
Signed-off-by: husharp <ihusharp@gmail.com>
2023-05-12 11:43:16 +08:00
zyguan 2b0667c65c
lock_resolver: handle pessimistic locks in BatchResolveLocks (#794)
* lock_resolver: handle pessimistic locks in BatchResolveLocks

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Add test but failed on unistore because unistore's ScanLock doesnt return lock type

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Address comments

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix test

Signed-off-by: zyguan <zhongyangguan@gmail.com>

* Fix golangci

Signed-off-by: zyguan <zhongyangguan@gmail.com>

---------

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Signed-off-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-05-11 12:26:01 +08:00
MyonKeminta 5c324b7c1e
lock_resolver: support verifying primary for check_txn_status (#777)
* support verifying primary for check_txn_status

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* update kvproto

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* add more failpoint usages

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* update depencency and fix test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Do not skip for unistore; refine logs

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Address comments

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

---------

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-05-08 16:18:26 +08:00
Connor 62cc95123c
Fix wrong resource group name for some requests (#788)
* fix wrong resource group name

Signed-off-by: Connor1996 <zbk602423539@gmail.com>
2023-04-28 19:03:56 +08:00
Hu# 069dbc5b6c
fix TestRURuntimeStatsCleanUp (#787)
Signed-off-by: husharp <ihusharp@gmail.com>
2023-04-28 13:43:54 +08:00
Connor 35c1ee47c4
Set resource group penalty (#772)
* Set resource group penalty 

Signed-off-by: Connor1996 <zbk602423539@gmail.com>
2023-04-19 20:39:20 +08:00
MyonKeminta 92db9f7b15
Support specifying checking forUpdateTS in prewrite (#756)
* Support specifying checking forUpdateTS in prewrite

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix go mod in tests

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Add test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Add successful cases to the test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Update dependencies

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Check LockedWithConflictTS greater than requested ForUpdateTS

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

---------

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-04-17 14:53:28 +08:00
Lloyd-Pottiger 1ec0ff5bf4
Support return TiFlash system table by grpc (#759)
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
2023-04-06 14:42:57 +08:00
Ryan Leung fd1b0552eb
upgrade pd client (#755)
Signed-off-by: Ryan Leung <rleungx@gmail.com>
2023-03-30 14:55:23 +08:00
MyonKeminta ea13e97002
Add exitAggressiveLockingIfInapplicable function and call within mutex of lockKeys (#749)
* Add exitAggressiveLockingIfInapplicable function and call within mutex of lockKeys

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* fix fmt

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Add test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

---------

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-03-28 16:41:04 +08:00
Hu# f23d942527
gomod: update pd client (#743)
Signed-off-by: husharp <jinhao.hu@pingcap.com>
Co-authored-by: disksing <i@disksing.com>
2023-03-27 14:37:08 +08:00
JmPotato 9d950905d7
Introduce the RURuntimeStats (#732)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-03-16 10:19:36 +08:00
iosmanthus eb0bd61645
attach keyspace_id for manual compact request (#737) 2023-03-13 14:53:59 +08:00
MyonKeminta f555fdd2c9
txn: support force locking and lock only if exists be used together (#727)
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-03-09 18:08:32 +08:00
Yongbo Jiang df993878bd
*: update pd client (#734)
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
2023-03-09 11:34:04 +08:00
Yongbo Jiang 3f7860f109
region_request: handle resource group error before Backoff (#719)
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Co-authored-by: disksing <i@disksing.com>
2023-03-02 13:40:57 +08:00
Yongbo Jiang e2da552702
*: Update pd client (#722)
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
Co-authored-by: disksing <i@disksing.com>
2023-02-28 17:15:02 +08:00
disksing 891ef575be
update golang.org/x/net (#717)
Signed-off-by: disksing <i@disksing.com>
2023-02-27 13:43:10 +08:00
iosmanthus e0e6019f8a
attach keyspace_id to tikv/tiflash requests (#682) 2023-02-20 13:10:03 +08:00
ShuNing 95ebf6a863
upgrade pd client version (#701)
Signed-off-by: nolouch <nolouch@gmail.com>
2023-02-09 12:40:22 +08:00
disksing 6a1ecaa292
integration: update tidb to master (#695)
Signed-off-by: disksing <i@disksing.com>
2023-02-07 17:00:07 +08:00
disksing 9b3ecc1dca
*: update pd client (#694)
Signed-off-by: disksing <i@disksing.com>
2023-02-07 12:00:04 +08:00
Hangjie Mo 56c521f109
internal: update `FlashbackInProgress` error msg (#692)
Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>
2023-02-06 17:34:59 +08:00
Hu# 8fd09cd88c
config support both path and names (#683)
Signed-off-by: HuSharp <jinhao.hu@pingcap.com>
2023-02-02 18:11:45 +08:00
Hu# 3c20a793ba
update tidb version (#676)
Signed-off-by: HuSharp <jinhao.hu@pingcap.com>
2023-01-20 14:57:33 +08:00
JmPotato ed6d507bc7 Update the go.mod
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-01-19 20:10:24 +08:00
HuSharp 158f72c6f3 update pd client
Signed-off-by: HuSharp <jinhao.hu@pingcap.com>
2023-01-19 18:06:38 +08:00
HuSharp 1679631b9a update tidb
Signed-off-by: HuSharp <jinhao.hu@pingcap.com>
2023-01-19 16:23:55 +08:00
JmPotato 320af6501e Introduce the switch
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-01-19 16:14:47 +08:00
disksing bd55989520
fix integration test (#673)
Signed-off-by: disksing <i@disksing.com>
2023-01-18 20:19:38 +08:00
Hu# 2a02753d9c
client: update pd/client to repair kvproto compatibility (#667)
Signed-off-by: HuSharp <jinhao.hu@pingcap.com>
2023-01-18 19:18:40 +08:00
David f313ddf58d
reformat codec and add keyspace support (#649)
Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
2023-01-10 15:15:33 +08:00
Zwb c20405f345
support witness peers (#633)
Signed-off-by: Wenbo Zhang <ethercflow@gmail.com>
2023-01-09 20:53:19 +08:00
wjHuang 2d2a3fa00e
*: remove the support of `amend transaction` (#635)
* done

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* done

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* fix test

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* fix lint

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* fix test

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* fix

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
2023-01-09 16:30:27 +08:00
glorv 4e1d38d8f8
add resource group name in request context (#650)
Signed-off-by: glorv <glorvs@163.com>
2023-01-09 15:18:45 +08:00
MyonKeminta 0f633e4163
Fix incorrect insertion behavior in aggressive locking mode and add tests (#651)
* Add more tests and fix the bug of insert in aggressive locking

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix tests

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Fix insert test

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Avoid primary re-selecting in TestAggressiveLockingLoadValueOptionChanges

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

* Address comments

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>

Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
Co-authored-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2023-01-04 15:24:09 +08:00
tiancaiamao 43601f3d49
go.mod: update github.com/tiancaiamao/gp (#652)
Signed-off-by: tiancaiamao <tiancaiamao@gmail.com>
2022-12-30 17:39:35 +08:00
tiancaiamao 018c59dbd8
bind the goroutine pool with store and close on Close (#645)
Signed-off-by: tiancaiamao <tiancaiamao@gmail.com>
2022-12-26 16:01:48 +08:00
tiancaiamao 809eb2d10f
use goroutine pool to avoid the `runtime.newstack` call (#637)
Signed-off-by: tiancaiamao <tiancaiamao@gmail.com>
2022-12-14 16:16:36 +08:00
MyonKeminta 5dc09b15e7
Add aggressive-locking mechanism and support locking with conflict (#528)
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2022-12-01 11:03:39 +08:00
Hangjie Mo 857772dd09
go.mod: update kvproto to adapt flashback (#626)
* go.mod: update kvproto to adapt flashback

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>

* update go.mod

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>
2022-11-29 11:21:17 +08:00
xiongjiwei e9db9e6a8a
make `txn_source` be u64 type (#618)
Signed-off-by: xiongjiwei <xiongjiwei1996@outlook.com>
2022-11-21 10:50:13 +08:00
xiongjiwei e72337b647
txn: add `txn_source` field in txn (#617)
Signed-off-by: xiongjiwei <xiongjiwei1996@outlook.com>
2022-11-15 13:18:26 +08:00
YangKeao 8f35d3a669
upgrade tidb in integration test (#614)
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
2022-11-02 10:57:41 +08:00
YangKeao 30e803b708
implement the external timestamp client (#610)
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
2022-10-31 14:32:02 +08:00
Ping Yu f0ef29bccd
rawkv: permit empty value (#612)
Signed-off-by: pingyu <yuping@pingcap.com>
2022-10-31 12:25:56 +08:00
ekexium 6c9c7c7c58
Fix the false positive assertion error caused by loss of pessimistic locks (#596)
Signed-off-by: ekexium <eke@fastmail.com>
2022-10-26 16:34:54 +08:00
JmPotato 91be9c6ce6
Introduce the FlashbackNotPrepared error (#606)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2022-10-17 17:26:35 +08:00
Yilin Chen 6def8d7b90
Fix the missing unlock in extractKeyExistsErr (#603)
Signed-off-by: Yilin Chen <sticnarf@gmail.com>

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2022-10-12 15:48:56 +08:00
Hangjie Mo 51f3bd3944
*: Support kv_prepare_flashback_to_version cmd (#592)
Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>
2022-09-29 19:13:18 +08:00
ekexium 426055b575
Distinguish different types of write conflicts (#583)
* distinguish different types of write conflicts

Signed-off-by: ekexium <eke@fastmail.com>

* update kvproto; add write conflict reason

Signed-off-by: ekexium <eke@fastmail.com>

Signed-off-by: ekexium <eke@fastmail.com>
Co-authored-by: Yilin Chen <sticnarf@gmail.com>
2022-09-08 19:49:57 +08:00
TonsnakeLin 080fdfe665
extend the scope of using lock_only_if_exists (#582)
Signed-off-by: TonsnakeLin <lpbgytong@163.com>
2022-09-07 20:09:47 +08:00
JmPotato e425355a10
*: introduce the non-retryable error FlashbackInProgress (#579)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2022-09-06 14:28:21 +08:00
TonsnakeLin fed87c9939
PessimisticLock: Lock the specified key only if the key exists (#561)
* optimize for lock if exists

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* fix bugs for lock if exists

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* optimize lock info

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* fix bugs

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* remove the contrl flag for lock stats

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* update kvproto

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* change to LockOnlyIfExists

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* update kvproto

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* change to LockOnlyIfExists

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* make test pass

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* Update txnkv/transaction/txn.go

Co-authored-by: MyonKeminta <9948422+MyonKeminta@users.noreply.github.com>
Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* *: add getPDClient to rawKV public api (#570)

Signed-off-by: dongxu <i@huangdx.net>

Signed-off-by: dongxu <i@huangdx.net>
Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* Update README.md (#571)

Signed-off-by: dongxu <i@huangdx.net>
Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* update dependency of integration test (#572)

Signed-off-by: cfzjywxk <lsswxrxr@163.com>

Signed-off-by: cfzjywxk <lsswxrxr@163.com>
Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* Support postponed conflict check (#556)

* replace kvproto

Signed-off-by: ekexium <eke@fastmail.com>

* support NeedConflictCheck

Signed-off-by: ekexium <eke@fastmail.com>

* fix mutation encoding

Signed-off-by: ekexium <eke@fastmail.com>

* support temporary flag

Signed-off-by: ekexium <eke@fastmail.com>

* update kvproto

Signed-off-by: ekexium <eke@fastmail.com>

* fix style

Signed-off-by: ekexium <eke@fastmail.com>

* add an option to enable the behavior

Signed-off-by: ekexium <eke@fastmail.com>

* replace AfterCheckPoint with existing canModity

Signed-off-by: ekexium <eke@fastmail.com>

* UpdateFlag do not unset temporary flag

Signed-off-by: ekexium <eke@fastmail.com>

* remove unused function

Signed-off-by: ekexium <eke@fastmail.com>

* update tidb dependency

Signed-off-by: ekexium <eke@fastmail.com>

update tidb dependency

Signed-off-by: ekexium <eke@fastmail.com>

* fix test

Signed-off-by: ekexium <eke@fastmail.com>

* do no unset flag on read

Signed-off-by: ekexium <eke@fastmail.com>

* update tidb dependency

Signed-off-by: ekexium <eke@fastmail.com>

* update comment

Signed-off-by: ekexium <eke@fastmail.com>

Signed-off-by: ekexium <eke@fastmail.com>

* add testcase

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* add test case

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* unset pk if lockifexits failed

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* fix format

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* LockOnlyIfExists only when pk selected

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* remove test function to txn_probe

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* add more info to error

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* add more info to error

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

* add protection for input key

Signed-off-by: TonsnakeLin <lpbgytong@163.com>

Signed-off-by: TonsnakeLin <lpbgytong@163.com>
Signed-off-by: dongxu <i@huangdx.net>
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
Signed-off-by: ekexium <eke@fastmail.com>
Co-authored-by: MyonKeminta <9948422+MyonKeminta@users.noreply.github.com>
Co-authored-by: dongxu <i@huangdx.net>
Co-authored-by: cfzjywxk <lsswxrxr@163.com>
Co-authored-by: ekexium <eke@fastmail.com>
Co-authored-by: Yilin Chen <sticnarf@gmail.com>
2022-09-06 09:50:26 +08:00
JmPotato 87f5f61897
Support the kv_flashback_to_version cmd (#578)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2022-09-05 11:36:49 +08:00
ekexium 0f6bff3c57
update tidb dependency of integration tests & use go 1.19 (#577)
* update tidb dependency of integration tests

Signed-off-by: ekexium <eke@fastmail.com>

* use go 1.19

Signed-off-by: ekexium <eke@fastmail.com>

* Revert "use go 1.19"

This reverts commit 3d954d6fd2.

Signed-off-by: ekexium <eke@fastmail.com>

* use go 1.19 in compatibility test

Signed-off-by: ekexium <eke@fastmail.com>

Signed-off-by: ekexium <eke@fastmail.com>
2022-09-02 14:56:27 +08:00
ekexium 0130f76738
Support postponed conflict check (#556)
* replace kvproto

Signed-off-by: ekexium <eke@fastmail.com>

* support NeedConflictCheck

Signed-off-by: ekexium <eke@fastmail.com>

* fix mutation encoding

Signed-off-by: ekexium <eke@fastmail.com>

* support temporary flag

Signed-off-by: ekexium <eke@fastmail.com>

* update kvproto

Signed-off-by: ekexium <eke@fastmail.com>

* fix style

Signed-off-by: ekexium <eke@fastmail.com>

* add an option to enable the behavior

Signed-off-by: ekexium <eke@fastmail.com>

* replace AfterCheckPoint with existing canModity

Signed-off-by: ekexium <eke@fastmail.com>

* UpdateFlag do not unset temporary flag

Signed-off-by: ekexium <eke@fastmail.com>

* remove unused function

Signed-off-by: ekexium <eke@fastmail.com>

* update tidb dependency

Signed-off-by: ekexium <eke@fastmail.com>

update tidb dependency

Signed-off-by: ekexium <eke@fastmail.com>

* fix test

Signed-off-by: ekexium <eke@fastmail.com>

* do no unset flag on read

Signed-off-by: ekexium <eke@fastmail.com>

* update tidb dependency

Signed-off-by: ekexium <eke@fastmail.com>

* update comment

Signed-off-by: ekexium <eke@fastmail.com>

Signed-off-by: ekexium <eke@fastmail.com>
2022-08-30 15:38:39 +08:00
cfzjywxk 389101f073
update dependency of integration test (#572)
Signed-off-by: cfzjywxk <lsswxrxr@163.com>

Signed-off-by: cfzjywxk <lsswxrxr@163.com>
2022-08-25 11:57:45 +08:00
cfzjywxk 0d0ae0dcfb
txn: seperate prewrite and commit in detail information and add clone methods (#567)
* seperate the prewrite and commit primary in runtime info

Signed-off-by: cfzjywxk <lsswxrxr@163.com>

* fix the integration test

Signed-off-by: cfzjywxk <lsswxrxr@163.com>

Signed-off-by: cfzjywxk <lsswxrxr@163.com>
2022-08-18 16:48:34 +08:00
Hangjie Mo 0cdc7c1d0f
go.mod: update pd/client (#554)
* go.mod: update pd/client

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>

* go mod tidy

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>

* update go.mod in it

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>

* fix test

Signed-off-by: Hangjie Mo <mohangjie1995@gmail.com>
2022-07-25 17:08:34 +08:00
haojinming aa9ded37d1
add checksum for apiv2 (#549)
* add checksum for apiv2

Signed-off-by: haojinming <jinming.hao@pingcap.com>

* fix test

Signed-off-by: haojinming <jinming.hao@pingcap.com>

* fix test

Signed-off-by: haojinming <jinming.hao@pingcap.com>

* address review comments

Signed-off-by: haojinming <jinming.hao@pingcap.com>

* address review comments

Signed-off-by: haojinming <jinming.hao@pingcap.com>

* add unit test for EncodeEncodeV2KeyRanges

Signed-off-by: haojinming <jinming.hao@pingcap.com>

Co-authored-by: iosmanthus <dengliming@pingcap.com>
2022-07-20 14:42:24 +08:00
Weizhen Wang 86d51ba7eb
*: update google/btree to improve performance (#547)
* *: update google/btree to improve performance

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* update ci

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2022-07-18 16:02:14 +08:00
Yilin Chen 57c12f7c64
Handle more detailed statistics from TiKV (#536)
* support more detailed statistics returned from TiKV

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* fix log formatting

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* add to test

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2022-07-13 16:56:47 +08:00
iosmanthus 68cd1bc6c1
Introduce API v2 (#494)
* introduce raw.Client with api v2

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* migrate rawkv test to api v2

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* git fire: refactoring the interface SplitRegion of CodecClientV2

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* go mod tidy

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix split region issue in CodecClientV2

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* rearrange imports

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* add version info for RegionCache

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* delay request encoding to RPCClient

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* prevent multiple encoding

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* wip: debugging retry logic

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix EpochNotMatch region decoding

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* remove txn request branch

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* copy request before encoding it

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* add gRPCDialOptions for rawkv.Client

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix api breaking change of raw.NewClient

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* address menglong's comments

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* go mod tidy

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* address comments and fix linter

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix api_test

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix TestScan

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix TestScan

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

* fix compatibility

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>

Co-authored-by: Xiaoguang Sun <sunxiaoguang@users.noreply.github.com>
2022-07-09 14:49:46 +08:00
glorv 114ba4082e
add replica read adjuster function in KVSnapshot (#540)
Signed-off-by: glorv <glorvs@163.com>
2022-07-07 17:12:24 +08:00
you06 bb026bdad8
client: support requests with source label (#506)
* support request scope and source.

Signed-off-by: you06 <you1474600@gmail.com>

* update

Signed-off-by: you06 <you1474600@gmail.com>

* use counter for requests with too-many source

Signed-off-by: you06 <you1474600@gmail.com>

* refine resolve lock

Signed-off-by: you06 <you1474600@gmail.com>

* remove request source from resolve details

Signed-off-by: you06 <you1474600@gmail.com>

* address comment

Signed-off-by: you06 <you1474600@gmail.com>
2022-06-24 18:17:09 +08:00
Yilin Chen be31f33ba0
Avoid sending requests to unhealthy leader (#503)
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2022-06-13 19:27:34 +08:00
ekexium e69cd80e58
Preserve is_retry_request flag for prewrite when retrying with region errors (#513)
* add a test to verify the incorrect setting of is_retry_request

Signed-off-by: ekexium <ekexium@gmail.com>

* preserve the retry flag for prewrite

Signed-off-by: ekexium <ekexium@gmail.com>

* fix test

Signed-off-by: ekexium <ekexium@gmail.com>

* add more explanations

Signed-off-by: ekexium <ekexium@gmail.com>
2022-05-31 16:04:28 +08:00
guo-shaoge 700cbe60d2
support find stores with tiflash_mpp label (#481)
Signed-off-by: guo-shaoge <shaoge1994@163.com>
Co-authored-by: Yilin Chen <sticnarf@gmail.com>
2022-05-23 11:22:53 +08:00
Wenxuan 5d3195ce11
tiflash: Add TiFlash compact command (#504)
* Add TiFlash compact command

Signed-off-by: Wish <breezewish@outlook.com>

* Fix integration test go.mod

Signed-off-by: Wish <breezewish@outlook.com>

* Upgrade tidb dependency

Signed-off-by: Wish <breezewish@outlook.com>

* Use newer golang compiler

Signed-off-by: Wish <breezewish@outlook.com>
2022-05-17 21:31:43 +08:00
Ziqian Qin 190a4d190c
fix the vulnerability of atomicity in async commit (#492)
* fix the vulnerability of atomicity in async commit

Signed-off-by: ekexium <ekexium@gmail.com>

Revert "fix the vulnerability of atomicity in async commit"

This reverts commit b0b34c56168ba288e1619e66e626321365cb0921.

tidy up

Signed-off-by: ekexium <ekexium@gmail.com>

* add test

Signed-off-by: ekexium <ekexium@gmail.com>

* shorten the time of the test

Signed-off-by: ekexium <ekexium@gmail.com>

* fix test

Signed-off-by: ekexium <ekexium@gmail.com>

Co-authored-by: Yilin Chen <sticnarf@gmail.com>
2022-05-13 17:09:52 +08:00
Weizhen Wang 038b03552a
atomic PrewriteMaxBackoff (#488)
* atomic PrewriteMaxBackoff

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* PrewriteMaxBackoff use uint64

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

Co-authored-by: Yilin Chen <sticnarf@gmail.com>
2022-05-10 10:24:53 +08:00
Lei Zhao 5b4040a95c
reconnect when meets store-not-match errors (#456)
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
2022-03-24 17:30:51 +08:00
MyonKeminta 5042c6f2aa
Return assertion failed error less prior to other kinds of errors (#448)
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
2022-03-11 12:36:19 +08:00
龙方淞 cd7e7681c2
Update lock ttl when retry to pessimistic lock keys (#417)
Signed-off-by: longfangsong <longfangsong@icloud.com>
2022-03-10 16:10:47 +08:00
Lei Zhao 7e34d88af3
region_cache: support buckets (#439)
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
2022-03-09 13:52:39 +08:00
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 1aa72efa9b
mockstore: fix assertion (#446)
Signed-off-by: disksing <i@disksing.com>
2022-03-07 13:10:35 +08:00
disksing 7cbe10ea93
integration: try not to skip tests when run with tikv (#445)
Signed-off-by: disksing <i@disksing.com>
2022-03-07 11:27:20 +08:00
Yilin Chen a6db0c9a3e
Fix incorrect LockNoWait value (#435)
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2022-03-02 20:03:17 +08:00
disksing 0214a9efa0
integration: replace some unistore with mockstore (#432)
Signed-off-by: disksing <i@disksing.com>
2022-03-02 16:36:25 +08:00
disksing cb9955362c
integration: use less tidb code (#431)
Signed-off-by: disksing <i@disksing.com>
2022-03-02 15:00:40 +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 79b962a84d
integration: update tidb to master branch (#426)
Signed-off-by: disksing <i@disksing.com>
2022-02-22 11:34:36 +08:00
disksing 589cf79b2a
*: update etcd client to v3.5.2 (#423)
Signed-off-by: disksing <i@disksing.com>
2022-02-17 22:01:16 +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
LemonHX cea0c4c6e6
update tidb version (#419)
Signed-off-by: lemonhx <lemonhx@lemonhx.tech>
2022-02-09 09:41:21 +08:00
LemonHX d228150997
implement pd's global config (#405)
* update kvproto and pd, implement global config mock api

Signed-off-by: lemonhx <lemonhx@lemonhx.tech>

* update tidb version

Signed-off-by: lemonhx <lemonhx@lemonhx.tech>

* update pd version to pass tikv integration test

Signed-off-by: lemonhx <lemonhx@lemonhx.tech>
2022-01-06 20:00:26 -08:00
disksing 13298f12fb
rawkv: split BatchPut and BatchPutTTL (#414)
Signed-off-by: disksing <i@disksing.com>
2022-01-06 02:46:37 -08:00
iosmanthus fe2def20bb
fix RawBatchPutRequest forward compatibility (#403)
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
2022-01-05 22:53:06 -08:00
Yilin Chen dd263ab9f1
integration_tests: speed up TestCommitOnTiKVDiskFullOpt (#411)
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2022-01-04 14:58:47 +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
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
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
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
Xu Qiaolun 8a4ce38c2a
tikv: remove BeginWithOption method (#370)
* tikv: remove BeginWithOption method

Signed-off-by: Xu Qiaolun <jamesxql@gmail.com>

* reset the tidb version in integration test to latest tidb master

Signed-off-by: Xu Qiaolun <jamesxql@gmail.com>
2021-11-11 00:56:58 -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
JmPotato cef46d13cc
Clean up the temporary changes (#360)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-11-01 10:25:52 +08:00
JmPotato 2fd3841894
Update the PD client to the latest version (#352)
* Update the PD client to the latest version

Signed-off-by: JmPotato <ghzpotato@gmail.com>

* Temporarily change the TiDB test branch

Signed-off-by: JmPotato <ghzpotato@gmail.com>

* Fix the client-go/integration_tests go.mod

Signed-off-by: JmPotato <ghzpotato@gmail.com>

* Fix the client-go/integration_tests go.mod again

Signed-off-by: JmPotato <ghzpotato@gmail.com>

* Fix the integration_tests

Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-29 10:40:11 +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 61664cf55c
integration_tests: remove use of errors.Trace (#327)
Signed-off-by: disksing <i@disksing.com>
2021-10-13 06:58:44 +00:00
disksing 9921da23d5
*: remove parser dependency (#324)
Signed-off-by: disksing <i@disksing.com>
2021-10-12 00:54:00 +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
Yilin Chen ee5063fec3
Fix flaky TestSecondaryListInPrimaryLock (#318) 2021-09-29 13:45:23 +08:00
daimashusheng 4f806a5442
batchput add ttl to every key (#298)
Signed-off-by: tangjk <tangjiankun1226@gmail.com>
2021-09-26 11:50:08 +00:00
disksing 2d250d555d
error: add function to check if error is undetermined (#300)
Signed-off-by: disksing <i@disksing.com>
2021-09-08 13:10:34 +08:00
Lei Zhao 1798c19099
separate rawkv and txnkv tests (#295)
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
2021-09-01 22:05:16 +08: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
Yilin Chen b440ea2f58
select replica for forward requests using RegionRequestSender (#264)
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2021-08-16 19:27:02 +08:00