Commit Graph

612 Commits

Author SHA1 Message Date
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
ekexium a72e61dc64
log: print log if the assertion error is generated from client-go (#771)
Signed-off-by: ekexium <eke@fastmail.com>
Co-authored-by: disksing <i@disksing.com>
2023-04-19 17:42:17 +08:00
ShuNing dd6caa4c03
execdetails: add RRU/WRU interface of RURuntimeStats (#769)
Signed-off-by: nolouch <nolouch@gmail.com>
2023-04-19 16:57:01 +08:00
Artem Danilov 415713766f
avoid dataIsNotReady error while retrying stale read on the leader (#765)
* avoid dataIsNotReady error while retrying stale read on the leader

Signed-off-by: artem_danilov <artem_danilov@airbnb.com>

* move StaleRead flag reset to retry section

Signed-off-by: artem_danilov <artem_danilov@airbnb.com>

* move all logic to #next and allow retry on the leader

Signed-off-by: artem_danilov <artem_danilov@airbnb.com>

---------

Signed-off-by: artem_danilov <artem_danilov@airbnb.com>
Co-authored-by: artem_danilov <artem_danilov@airbnb.com>
2023-04-19 10:48:52 +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
Jack Yu c853ddc68c
metrics: add txn ttl lifetime (#766)
Signed-off-by: Jack Yu <jackysp@gmail.com>
Co-authored-by: Shirly <AndreMouche@126.com>
2023-04-14 13:59:29 +08:00
ekexium 67e56a956f
For KeyIsLocked error reported for timeout, if a lock is recently updated, don't try to resolve it. (#758)
* update client-go; format

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

* feat: do not resolve lock if duration_to_last_updated is short

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

* adjust the threshold to 1200ms to allow small deviation

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

* fix: don't treat it as WriteConflict, simply retry

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

* update kvproto

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

* set the threshold to 300ms

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

---------

Signed-off-by: ekexium <eke@fastmail.com>
2023-04-13 16:14:28 +08:00
ekexium f3e87039d8
Finer `is_retry_request` settings (#763)
* set is_retry_request only for requests that is possible to have undetermined errors

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

* rename tryTimes to retryTimes

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

---------

Signed-off-by: ekexium <eke@fastmail.com>
Co-authored-by: cfzjywxk <lsswxrxr@163.com>
2023-04-10 10:39:43 +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
iosmanthus 4ac424aea1
refactor decoding buckets with new interface method: DecodeBucketKeys (#760)
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
2023-03-31 16:06:44 +08:00
iosmanthus 6a92aeec92
fix api v2 decode of region bucket's keys (#757)
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
2023-03-31 11:07:45 +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
Smilencer bb350d6ea8
fix data race (#736)
Signed-off-by: Smityz <smityz@qq.com>
Co-authored-by: disksing <i@disksing.com>
2023-03-27 16:10:11 +08:00
Daniël van Eeden f7e35b25be
Log request info for label warning (#744)
Signed-off-by: Daniël van Eeden <git@myname.nl>
Co-authored-by: disksing <i@disksing.com>
2023-03-27 14:51:16 +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
cfzjywxk 4f59f92a24
fix the incorrect txn size metric usages (#746)
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
2023-03-27 13:58:40 +08:00
iosmanthus 2e8d7a2d8c
refine keyspace request encoding (#742) 2023-03-21 16:14:47 +08:00
you06 884a634378
compatible batch copr with load-based replica read (#739)
* compatible batch copr with load-based replica read

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

* handle batch cop when server is busy

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

debug

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

debug

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

debug

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

remove debug

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

* address comment

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

* ci

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

* ci

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

---------

Signed-off-by: you06 <you1474600@gmail.com>
2023-03-17 11:26:22 +08:00
BornChanger d19741b3ed
internal: treat default resource group normally (#708)
Signed-off-by: BornChanger <dawn_catcher@126.com>
2023-03-16 16:06:03 +08:00
ShuNing ad4d1554b3
resource_control: consider default as a normal group (#741)
Signed-off-by: nolouch <nolouch@gmail.com>
2023-03-16 15:56:37 +08:00
JmPotato 9d950905d7
Introduce the RURuntimeStats (#732)
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2023-03-16 10:19:36 +08:00
glorv c9119d02ce
support time detail v2 (#729)
* support time detail v2

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

---------

Signed-off-by: glorv <glorvs@163.com>
Co-authored-by: Connor <zbk602423539@gmail.com>
2023-03-13 21:32:19 +08:00
Lucas a7e3df4ab1
[Metrics] Supply extra metrics to monitor the flows under `prefer-leader` mode. (#716)
Signed-off-by: Lucasliang <nkcs_lykx@hotmail.com>
2023-03-13 18:08:39 +08:00
iosmanthus c21bf9396a
add api_version for mpp task meta (#738) 2023-03-13 15:07:26 +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
Liqi Geng 4037273b3c
Merge pull request #728 from guo-shaoge/support_engine_role
region_cache: support <engine_role, write> for disaggregated tiflash
2023-03-07 15:58:41 +08:00
guo-shaoge bd24a9e443
Merge branch 'master' into support_engine_role 2023-03-07 15:47:49 +08:00
you06 8a8ef35790
support non-block read region (#725)
Signed-off-by: you06 <you1474600@gmail.com>
2023-03-07 15:15:35 +08:00
cfzjywxk bdd41058aa
metrics: seperate metrics with source scope for txn command (#723)
* seperate metrics with source scope

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

* fix async pessimistic rollback

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

* fix missing definition

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

---------

Signed-off-by: cfzjywxk <lsswxrxr@163.com>
2023-03-06 22:12:45 +08:00
guo-shaoge b26f90ead7
Merge branch 'master' into support_engine_role 2023-03-06 18:05:41 +08:00
guo-shaoge 39cd84957f fix fmt
Signed-off-by: guo-shaoge <shaoge1994@163.com>
2023-03-06 18:05:17 +08:00
guo-shaoge 0d003d077b region_cache: support <engine_role, write> for disaggregated tiflash
Signed-off-by: guo-shaoge <shaoge1994@163.com>
2023-03-06 17:53:57 +08:00
disksing 31d55e522c
*: remove deprecated linters (#726)
Signed-off-by: disksing <i@disksing.com>
2023-03-06 12:17:18 +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
cfzjywxk 49323956ae
metric: seperate source for txn cmd (#721)
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
2023-02-28 15:40:40 +08:00
iosmanthus 11d34cbd8a
fix attach api ctx error for unknown requests like StoreSafeTS (#720)
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
2023-02-28 13:47:31 +08:00
glorv 596b79404d
set group name in twoPhaseCommitter (#718)
Signed-off-by: glorv <glorvs@163.com>
2023-02-27 16:39:23 +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
Weizhen Wang 40a82457eb
tikv: configurable pool (#714)
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2023-02-27 11:23:58 +08:00
ShuNing 811a62bb69
ci: fix compatibility test due to the low GO version (#711)
Signed-off-by: nolouch <nolouch@gmail.com>
2023-02-24 16:14:48 +08:00
Yilin Chen a27994e5aa
Support load-based replica read (#675)
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2023-02-22 15:35:43 +08:00
iosmanthus e0e6019f8a
attach keyspace_id to tikv/tiflash requests (#682) 2023-02-20 13:10:03 +08:00
ekexium 2051f572a1
fix: lock_if_exist + aggressive locking (#705)
* fix: locking commands skipped by lock_only_if_exists are mistakenly calculated as successfully locked for aggressive locking

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

* refactor

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

---------

Signed-off-by: ekexium <ekexium@gmail.com>
2023-02-20 09:50:30 +08:00
Ping Yu b3c491995e
fix context leak in BatchDelete (#704)
Signed-off-by: Ping Yu <yuping@pingcap.com>
2023-02-15 15:57:57 +08:00
ShuNing 95ebf6a863
upgrade pd client version (#701)
Signed-off-by: nolouch <nolouch@gmail.com>
2023-02-09 12:40:22 +08:00
ShuNing b9d788cc4a
resource_contrl: change the log level (#700)
Signed-off-by: nolouch <nolouch@gmail.com>
2023-02-09 11:42:15 +08:00