Commit Graph

191 Commits

Author SHA1 Message Date
humengyu 2eb77d6891
[close #370] make gRPC and TiKV health check configurable (#369) 2021-12-10 23:55:11 +08:00
Xiaoguang Sun d8841e7fed
[close #380] make gRPC idle timeout configurable (#379) 2021-12-10 03:53:39 +08:00
iosmanthus c95479e8ad
[close #375] warm up RawKVClient while creating it (#367) 2021-12-10 03:47:48 +08:00
iosmanthus 8dcd2c14f1
[close #375] warm up SmartRawKVClient while creating it (#376) 2021-12-09 23:59:45 +08:00
Liangliang Gu 48504bc322
[close #372] add circuit breaker and smart rawkv client (#358) 2021-12-09 20:30:59 +08:00
iosmanthus 1dd7cbabe8
fix seekLeaderStore NPE (#366) 2021-12-09 16:29:16 +08:00
birdstorm bb3ace76c1
Fix NullPointerException in getStore (#359) 2021-12-07 00:12:34 +08:00
Liangliang Gu f12d19d0a1
log SlowLog if error occures (#361) 2021-12-06 15:38:25 +08:00
Liangliang Gu b61b9cd938
check timeout during SeekLeader and SeekProxy (#352) (#357)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-12-02 10:01:54 +08:00
Liangliang Gu 1886700118
Batch cherry pick from release-3.1 (#356)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-12-01 20:51:41 +08:00
Ankita Wagh e2f10aa2ab
Add a flag to determine if TiFlash is enabled (#351)
Signed-off-by: Ankita Wagh <awagh@pinterest.com>
2021-11-30 16:35:41 +08:00
Jian Zhang c642d3e3ca
refactor getRegionStoreClientBuilder to improve readability (#349)
Signed-off-by: Jian Zhang <zjsariel@gmail.com>
2021-11-29 17:15:10 +08:00
humengyu 5ae87b1608
TwoPhaseCommiter log should be debug level (#334)
Signed-off-by: humengyu <hellohumengyu@gmail.com>
2021-11-20 10:25:13 +08:00
Peng Guanwen 75a700f034
Fix typo in error message (#330)
Signed-off-by: Peng Guanwen <pg999w@outlook.com>
2021-11-18 12:56:36 +08:00
Liangliang Gu 489e5c22ec
fix unclosed Thread when create TiSession error (#300)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-10-28 16:28:27 +08:00
Liangliang Gu f9cb05784d
Support load configuration from tikv.properties on classpath (#297)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-10-27 20:07:25 +08:00
Liangliang Gu 11bd22234d
Support configuration property file (#295)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-10-27 16:52:58 +08:00
Liangliang Gu b82276231c
support DataEncode in BackupMeta (#287)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-10-25 10:10:27 +08:00
Liangliang Gu 599da193df
pd backoff use tikv.rawkv.default_backoff_in_ms (#288) (#291)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-10-22 16:01:48 +08:00
Liangliang Gu f3a3abf3ef
add Serializable for BackupDecoder (#286)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-10-15 13:48:43 +08:00
Liangliang Gu bbe4f9b0c4
Support SST Decoder (#284) 2021-10-14 17:13:57 +08:00
Liangliang Gu dcea3b305c
ignore ci test with TxnKV (#281)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-09-30 13:37:22 +08:00
Peng Guanwen 869124880e
All keepTiKVToImportMode after stopped (#283) 2021-09-30 10:30:14 +08:00
Peng Guanwen d543ae73c0
PDClient: Add function to call pause checker API (#277) 2021-09-28 11:46:44 +08:00
Liangliang Gu 28380512f3
support tls (#280) 2021-09-28 11:13:11 +08:00
Rahil 37506fe091
Simplified condition (#273)
Signed-off-by: Rahil <rahilrshk@gmail.com>
2021-09-22 10:52:18 +08:00
Xu Qiaolun 0352c65931
grpc: keepalive with tikv (#279)
Signed-off-by: Xu Qiaolun <jamesxql@gmail.com>
2021-09-22 10:33:46 +08:00
Liangliang Gu 786c294cc2
Ingest: add retry with not leader error (#278) 2021-09-17 15:28:48 +08:00
Liangliang Gu 5e9d65e4c5
bulk load: support deduplicate key (#276)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-09-14 10:57:57 +08:00
Liangliang Gu 5268af69a1
let class Key implmemnts Serializable (#275)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-09-13 12:01:47 +08:00
Liangliang Gu 591815b889
Ingest: fix split batch bug & Increase ingest timeout (#272)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-09-08 19:52:16 +08:00
Liangliang Gu ebe1edc65c
workaround: disable TxnKV test because of https://github.com/tikv/client-java/issues/270 (#271)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-09-02 14:43:43 +08:00
Liangliang Gu 6a82620306
update pd get member timeout from 2s to 10s (#261) 2021-08-24 09:52:31 +08:00
Liangliang Gu cfe0e28710
fix ingest timeout (#263)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-08-23 18:21:59 +08:00
Chase Zhang 3f2aaf589d
Fix region key range while pulling CDC logs (#256) (#259)
Signed-off-by: chase <yun.er.run@gmail.com>
2021-08-23 10:07:59 +08:00
Bingchang Chen e5be356a5e
feat: txn ingest (#254)
* feat: txn ingest

Signed-off-by: abingcbc <abingcbc626@gmail.com>

* refactor: merge TxnImporterClient into Importerclient

Signed-off-by: abingcbc <abingcbc626@gmail.com>
2021-08-20 15:59:05 +08:00
Liangliang Gu 5e2dd1e216
add paramater: isTest to TiConfiguration (#258)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-08-20 14:43:43 +08:00
Liangliang Gu 00c68eabb1
fix closeAwaitTermination UT (#253)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-08-09 16:20:33 +08:00
Liangliang Gu 3640469097
add parameter: ingest grpc timeout (#252)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-08-09 15:43:50 +08:00
youze Liang 68e097dea4
TiStore: add implement Serializable (#251)
Signed-off-by: liangyouze <liangyouze876@gmail.com>

Co-authored-by: liangyouze <liangyouze876@gmail.com>
2021-08-09 14:13:31 +08:00
Liangliang Gu 5aebd12a37
add configration parameter for RawKV timeout (#246)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-08-05 17:42:42 +08:00
Liangliang Gu 2009982676
format code (#248)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-08-05 10:59:02 +08:00
Liangliang Gu 2327f9189f
Revert "fix backoff time (#241)" (#247)
This reverts commit 7fe59efd4a.
2021-08-05 10:52:16 +08:00
Liangliang Gu 7ecacd7b20
refactor TiSession.getSwitchTiKVModeClient (#240)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-07-29 19:52:24 +08:00
Liangliang Gu 257f3062c4
TiSession support graceful close (#238)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-07-28 14:15:57 +08:00
Wallace 7fe59efd4a
fix backoff time (#241) 2021-07-28 11:01:19 +08:00
Liangliang Gu 798244cd9e
RawKV support SST Ingest using KVStream interface (#233) 2021-07-22 16:40:55 +08:00
Wallace faf0cb435d
fix test (#235)
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-07-21 21:34:21 +08:00
Wallace d4d1c6ac6a
Try other peer when current leader of this region is not available. (#232)
* Auto switch leader peer rather than ask PD.

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-07-15 11:20:49 +08:00
Wallace 48b104f196
Refactor Region Cache to reduce lock (#228)
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-07-07 11:37:51 +08:00
Wallace 01898542c5
Forward request by store (#223)
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-07-01 01:35:21 +08:00
Liangliang Gu 630e1513e9
Support metrics with multiple TiSessions with the same port (#220)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-06-29 15:30:21 +08:00
Liangliang Gu d90237f16c
Refactor RawKVClient CAS API (#213)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-06-24 11:55:21 +08:00
Xiaoguang Sun fe6617e3c0
Support select replica with rich meta data (#171)
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
2021-06-23 15:50:21 +08:00
Wallace 550487db9c
fix not stop scheduler (#207)
* fix not stop scheduler

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>

* address comment

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-06-23 15:00:47 +08:00
Wallace d29cf0079c
pd-client grpc forward (#203)
* forward pd leader

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-06-22 18:22:42 +08:00
Wallace 5815678c56
Support grpc forward (#198)
* support grpc forward for tikv client

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-06-18 18:25:58 +08:00
Andy Lok 8308d796e7
Add CompareAndSet for RawClient and make Get returns Optional (#192)
* Add CompareAndSet for RawClient and make Get returns Optional

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Apply suggestions from code review

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

Co-authored-by: Liangliang Gu <marsishandsome@gmail.com>

* Format code

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Add putIfAbsent

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Rename sth

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Remove .vscode

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Remove .settings

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Delete .classpath

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Fix deadloop

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Enable TTL and CAS test

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* Fix test

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* rebase #202

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

Co-authored-by: Liangliang Gu <marsishandsome@gmail.com>
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-06-18 14:00:05 +08:00
birdstorm c6d7f0478c
fix scan exception when the start key is empty (lower_bound) (#199)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-06-17 15:56:20 +08:00
Wallace 4a401776d1
refactor kverrorhandler (#196)
* refactor kverrorhandler

Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-06-16 22:15:49 +08:00
Iosmanthus Teng 52f8c25d8b
rawclient: add batch scan keys (#191)
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
2021-06-09 15:47:58 +08:00
birdstorm f76a267f5b
Fix pd retry not recovered for 60s (#182)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-06-08 14:31:51 +08:00
Chase Zhang d469a2a10c
Add CDCClient to client-java with a few tiny changes for TiFlink (#174) 2021-06-07 10:04:35 +08:00
birdstorm a3ac697de1
add request retry number metrics for client (#183)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-06-04 15:41:06 +08:00
birdstorm 30e1e87e0d
fix concurrent backoffer (#172)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-05-27 16:06:40 +08:00
birdstorm 82d6a020df
invalidate all region cache on store when store id not found (#170) (#173)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-05-27 16:06:23 +08:00
zhoney 4e8f5f8369
return wrapped iterator for scan(RawKVClient) (#169)
Signed-off-by: zhangyi51 <zhangyi51@baidu.com>
2021-05-13 12:43:10 +08:00
Qishang Zhong 5265d3fd7b
Create a daemon thread pool for etcd client & Add name format for ExecutorService (#167)
Signed-off-by: Qishang Zhong <zhongqishang@gmail.com>
2021-04-25 10:41:16 +08:00
tison 45f5b91a67
Remove unused files (#165) 2021-04-19 14:40:46 +08:00
Liangliang Gu 8d6d663df8
fix oom cause missing data bug (#163)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-04-12 10:28:20 +08:00
Peter Levart 19787278c1
Allow building on JDK9+ by getting rid of DirectByteBuffer dependency (#155)
Signed-off-by: Peter Levart <peter.levart@gmail.com>
2021-04-07 12:54:52 +08:00
birdstorm 61d15408f4
remove list copy (#160)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-03-31 16:14:17 +08:00
Liangliang Gu 6f20129c9c
add replica selector (#151)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-03-26 15:55:53 +08:00
Liangliang Gu e84f2f819e
refactor follower read (#126)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-03-26 11:45:51 +08:00
birdstorm f24dce7a14
Add test batch put strategy (#150)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-03-25 17:39:31 +08:00
Wallace dde59a38f8
Fix putIfAbsent API name (#149)
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
2021-03-25 17:04:12 +08:00
birdstorm 762153a550
Add Network Mapping (#143)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-03-23 17:42:04 +08:00
birdstorm eecae1663e
Fix batch retry hanging when tikv is down (#145)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-03-23 17:21:01 +08:00
birdstorm 7cedfca241
fix update leader (#144)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-03-22 17:49:14 +08:00
birdstorm bee21d4f66
Fix store not match (#141)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-03-17 20:12:11 +08:00
birdstorm c9507c2fa7
Add atomic api support (#140)
* add atomic api support

Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-03-15 19:58:25 +08:00
birdstorm 56331e2f98
Optimize and Fix minor bugs on master (#139) 2021-03-11 21:25:40 +08:00
birdstorm af7326c96c
revert small lock optimization (#136)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-27 19:10:26 +08:00
birdstorm ce1a95780c
Fix batch put StackOverflow (#134)
* fix batch put stack overflow

Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-27 18:37:03 +08:00
birdstorm 1a7d5805cc
Fix cache missing because of recreation of RegionManager (#131)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-23 14:23:19 +08:00
birdstorm 45219438f9
Add TTL support (#129)
* add ttl support

Signed-off-by: birdstorm <samuelwyf@hotmail.com>

* fix time unit

Signed-off-by: birdstorm <samuelwyf@hotmail.com>

* ignore test temporary

Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-21 14:31:49 +09:00
birdstorm 10d8efbbc4
update kvproto version (#128)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-20 15:36:54 +08:00
birdstorm 7dfa1df52c
modify rawkv backoff time (#127)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-20 14:20:23 +08:00
birdstorm c84058e53a
retry when error is raft proposal dropped (#124)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-20 14:13:11 +08:00
birdstorm 7bef552b8e
Add DeleteRange API (#121)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-20 14:09:59 +08:00
Liangliang Gu 0d4b27bcd3
update function getNextFollower (#125)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
2021-02-18 16:35:40 +08:00
birdstorm ab9ccfb6e2
add scan prefix API (#122)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-02-18 13:57:42 +08:00
birdstorm 25e0ab3b14
Add Batch APIs (#118) 2021-02-01 11:38:12 +08:00
Liangliang Gu f58a530948
do not use TiSession.getInstance (#117) 2021-01-27 11:23:32 +08:00
birdstorm 66fd0690a9
modify tisession api document (#116)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-01-21 11:11:44 +08:00
birdstorm 76b731f8be
add raw empty scan test (#115)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-01-19 14:15:10 +08:00
birdstorm ad8a392645
fix getRegionByKey when using raw mode (#114)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-01-16 09:49:41 +08:00
birdstorm 4fb17db417
add raw scan api without limit (#113)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-01-15 13:34:03 +08:00
birdstorm 80eecbd348
fix raw batch put (#84)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-01-14 18:01:15 +08:00
birdstorm 4b07ecf0ac
fix shaded jar (#112)
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
2021-01-14 13:16:59 +08:00