Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
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
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
YangKeao 30e803b708
implement the external timestamp client (#610)
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
2022-10-31 14:32:02 +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
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
Lei Zhao 3a7675742e
txnkv: read through locks (#380)
Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
2021-12-01 16:35:10 +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 288c649636
fix license (#267)
Signed-off-by: disksing <i@disksing.com>
2021-08-15 01:48:01 +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 070dd85543
txnkv/txnsnapshot: init package for txnsnapshot (#245)
Signed-off-by: shirly <AndreMouche@126.com>
2021-07-27 12:10:35 +08:00
you06 ce977e34b0
test: fix overflow in ttl equal compare (#246)
Signed-off-by: you06 <you1474600@gmail.com>
2021-07-26 05:40:04 +00:00
Shirly ac355144c8
tikv/txn: add new pub function LockKeysWithWaitTime (#230)
* tikv/txn: add new pub function LockKeysWithWaitTime

Signed-off-by: shirly <AndreMouche@126.com>

* address comments

Signed-off-by: shirly <AndreMouche@126.com>

* tikv/pessimistic: update the constant for lock wait time

Signed-off-by: shirly <AndreMouche@126.com>

* kv/LockCtx: make lockWaitTime private

Signed-off-by: shirly <AndreMouche@126.com>

* address comments

Signed-off-by: shirly <AndreMouche@126.com>
2021-07-23 10:31:23 +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
tison 2e98d94911
*: remove dangling gocheck usages (#167)
Signed-off-by: tison <wander4096@gmail.com>

Co-authored-by: disksing <i@disksing.com>
2021-06-25 10:39:23 +08:00
disksing 74baa6990e
lock_test: replace pingcap/check with testify (#160)
Signed-off-by: disksing <i@disksing.com>

Co-authored-by: Shirly <AndreMouche@126.com>
2021-06-24 16:33:13 +08:00
disksing e1c2e9cab5
all tests run in serial (#150)
Signed-off-by: disksing <i@disksing.com>
2021-06-23 15:46:42 +08:00
disksing 937bc23425
update license (#110)
Co-authored-by: Shirly <AndreMouche@126.com>
2021-06-22 10:29:28 +08:00
disksing a76108498b
*: add integration_tests (#82) 2021-06-16 14:57:17 +08:00