Commit Graph

138 Commits

Author SHA1 Message Date
ShuNing 70049ae310
mod: update pd client (#1490)
Signed-off-by: nolouch <nolouch@gmail.com>
2024-11-11 09:02:27 +00:00
lance6716 8dfa86b5d1
dep: update github.com/dgryski/go-farm (#1476)
ref pingcap/tidb#56635

Signed-off-by: lance6716 <lance6716@gmail.com>
2024-10-15 06:50:14 +00:00
ekexium 527f80a186
feat: Broadcast min_commit_ts for pipelined transactions (#1458)
Signed-off-by: ekexium <eke@fastmail.com>
2024-09-25 01:34:14 +00:00
you06 d73cc1ed65
region cache: check if the pd returned regions covers the ranges (#1377)
* add reproduce test

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

* check if the pd returned regions covers the ranges

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

* handle limit

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

* fix lint

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

* add TODO for  func

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

* update tidb for integration test

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

* rename gap detection function

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>

* add half bounded cases

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

---------

Signed-off-by: you06 <you1474600@gmail.com>
2024-07-03 17:58:01 +08:00
you06 14f3d2b5b7
region cache: add `BatchLocateKeyRanges` interface (#1367)
* add batch scan interface

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

fix bug

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

copy encoded ranges

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

fix panic

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

add batch scan region test

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

fix log

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

remove need-leader option

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

remove need-leader optino

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

add comment

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

deprecate ScanRegions

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

update kvproto & pd client

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

update go.mod

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

fix need leader

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

fix integration test

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

fix lint

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

export BatchLocateKeyRangesOpt

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

update integration test's tidb

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

refactor BatchLocateKeyRanges and add comments

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

* update tidb of integration test

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

* remove key in error since redact is not supported

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

* remove key in error since redact is not supported

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

* address comment

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

---------

Signed-off-by: you06 <you1474600@gmail.com>
2024-06-24 16:06:06 +08:00
yibin d4f0f4cf12
Revert "upgrade grpc 1.64 (#1346)" (#1369)
This reverts commit 1c06c5cbf5.

Signed-off-by: yibin <huyibin@pingcap.com>
2024-06-21 17:03:19 +08:00
JmPotato 156cebc2de
Update the PD client to adopt the latest fix/optimization (#1360)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2024-06-04 12:57:05 +08:00
MyonKeminta 31a8ddab19
Support actively requesting update health feedback information by calling RPC to TiKV (#1287)
* Support actively requesting update health feedback information by calling RPC to TiKV

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

* Update kvproto; follow the protocol change; and add more comments

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

* Fix build

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

* Add integration tests

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

* tune the frequency of active updating

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

* Update kvproto

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

* Fix test

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

* Revert changes to examples

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

* Remove unnecessary empty line

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>
2024-05-27 14:36:27 +08:00
Weizhen Wang 1c06c5cbf5
upgrade grpc 1.64 (#1346)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2024-05-17 12:20:15 +08:00
JmPotato 52c232be3d
Update the PD client to adopt the latest optimization (#1326) 2024-04-30 16:32:54 +08:00
Weizhen Wang 1e1fe07b05
*: upgrade grpc 1.63.2 (#1289)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2024-04-26 10:56:09 +08:00
JmPotato ab337d6c51
Upgrade PD client to fix the TSO hang bug (#1241) 2024-03-20 17:03:30 +08:00
JmPotato c9767e5558
Upgrade PD client to fix the TSO hang bug (#1237) 2024-03-19 16:08:47 +08:00
ekexium 87a984a72d
feat: introduce GetLocal() and BatchGet cache for PipelinedMemDB (#1212)
* feat: introduce GetLocal() for MemBuffer

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

* downgrade tools to 0.18.0

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

* fix: set flushingMemDB = nil when an error is returned from a flush

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

* impl BatchGet for MemBuffer

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

test membuffer batch get

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

* add Prefetch & GetPrefetchCache

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

* cache multi Prefetch call

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

* add tests

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

* workaround for golang ci lint failure

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

* replace assert with require

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

* workaround golangci lint

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

* lint

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

* remove prefetch interface, pipelined memdb will cache batch get result

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

* update tidb

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

* fix batch get cache when membuffer is empty

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

* fix returned delete value

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

* fix: handle resourceGroupTag of Flush

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

* fix: set resource group tag for committer if it's pipelined

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

* Update internal/unionstore/pipelined_memdb.go

Co-authored-by: ekexium <eke@fastmail.com>

* remove prefetch interface

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

* release mutex

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

* flush wait to avoid race

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

* fix unstopped test

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

* set resource group tags for committer

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

* skip test due to tikv image not updated yet

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

* skip more test

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

---------

Signed-off-by: ekexium <eke@fastmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
Co-authored-by: you06 <you1474600@gmail.com>
2024-03-16 11:36:05 +08:00
Weizhen Wang b81a5ee7c4
*: upgrade grpc 1.62.1 (#1213)
* *: upgrade grpc 1.62.1

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

* *: upgrade grpc 1.62.1

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

---------

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2024-03-11 16:37:22 +08:00
cfzjywxk 9a37a0a77f
txn: attach cluster id in kv request (#1208)
* attach cluster id in kv requests

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

* update go mod in integration test

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

---------

Signed-off-by: cfzjywxk <cfzjywxk@gmail.com>
2024-03-08 18:59:12 +08:00
Ryan Leung bfab41501b
update pd client to the latest master (#1195)
Signed-off-by: Ryan Leung <rleungx@gmail.com>
2024-02-29 15:58:03 +08:00
MyonKeminta 03bbadb277
Support receving health feedback (#1153)
* Register health feedback handler in batch client

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

* update protocol

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

* Collect the health status and record to the stores

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

* Remove the filter which looks not necessary

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

* Add metrics

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

* Fix checkAndUpdateStoreHealthStatus panicking

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

* Add logs

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

* Merge SetHealthFeedbackHandler to Client

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

* Try another pattern: separated callback registry

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

* Try region cache eventListener pattern

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

* Add tests

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

* Test receiving froim callback

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

* Add tests to region cache

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

* Remove unnecessary debug log

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

* Add comments

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

* remove replace of tidb repo

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

* fix build

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

* Update comments; fix lint

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

* Add the isSlow method of Store back

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

* remove unused method for now to make lint happy

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>
2024-02-28 19:10:32 +08:00
you06 8d28d3cd3a
txn: introduce pipelined memdb, Flush and BufferBatchGet for pipelined DML (#1114)
* Support pipelined memdb.

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

* fix mutex for pipelined memdb

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

---------

Signed-off-by: you06 <you1474600@gmail.com>
2024-02-23 10:24:44 +08:00
Weizhen Wang 8c13f6b5a6
*: upgrade grpc1.62 (#1168)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2024-02-22 13:15:55 +08:00
Weizhen Wang 4bb62b6db7
upgrade grpc (#1156)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2024-02-18 11:41:12 +08:00
cfzjywxk 11cb7985f0
txn: enable pessimistic region rollback (#1149)
* enable pessimistic region rollback

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

* add key range parameters

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

* change interface to use start and end keys

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

---------

Signed-off-by: cfzjywxk <cfzjywxk@gmail.com>
2024-02-05 15:11:26 +08:00
lance6716 d1b611cbe2 integration_tests: upgrade tidb to remove replace
Signed-off-by: lance6716 <lance6716@gmail.com>
2024-01-26 13:48:55 +08:00
lance6716 20a4aa99a3 fix replace is missing
Signed-off-by: lance6716 <lance6716@gmail.com>
2024-01-24 16:03:34 +08:00
lance6716 cab3a43e0e fix replace is missing
Signed-off-by: lance6716 <lance6716@gmail.com>
2024-01-24 15:56:27 +08:00
lance6716 abcd9b5e50 fix go mod tidy under integration_tests
Signed-off-by: lance6716 <lance6716@gmail.com>
2024-01-24 15:50:13 +08:00
lance6716 db1a348d5d update pd client
Signed-off-by: lance6716 <lance6716@gmail.com>
2024-01-24 15:47:36 +08:00
Weizhen Wang 1af8d0b0ca
*: upgrade grpc1.61 (#1130)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: disksing <i@disksing.com>
2024-01-24 11:39:43 +08:00
YangKeao abda04c22a
export stats information about RPC count (#1110)
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
2024-01-12 15:16:19 +08:00
glorv 653d46260b patch tidb for integration test
Signed-off-by: glorv <glorvs@163.com>
2023-12-27 15:01:50 +08:00
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# 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
buffer ff39b4af09
error: handle bucket version not match (#918) 2023-08-22 03:25:20 -06: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