Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
474 commits
Select commit Hold shift + click to select a range
aebdada
raft_engine: set recover_state (#13272)
5kbpers Sep 8, 2022
079a069
raftstore: Implement engine trait can_apply_snapshot (#12924)
CalvinNeo Sep 8, 2022
3e86307
*: move ioload to tikv_util (#13421)
rleungx Sep 9, 2022
3f5acad
storage: skip Rollback when checking newer version for non-pessimisit…
sticnarf Sep 9, 2022
4cd28ba
hook after update safe ts (#13432)
hehechen Sep 9, 2022
cc127a0
engine: update rust-rocksdb (#13393)
tabokie Sep 9, 2022
49223a7
cloud: support backup to s3 when object lock enabled. (#13350)
3pointer Sep 13, 2022
63465fa
log-backup: merge small files in each flush (#13233)
Leavrth Sep 13, 2022
8c93b91
server: support customized addr/status_addr (#13234)
CalvinNeo Sep 13, 2022
2563311
test: Separate TestPdClient from test_raftstore component (#13453)
haojinming Sep 14, 2022
b6b9638
resolved_ts: track ingest sst (#13454)
hehechen Sep 14, 2022
592d423
raftstore: Implement coprocessor observer pre_persist (#12957)
CalvinNeo Sep 15, 2022
d762bd8
copr: implement several mysql time related types json (#13418)
YangKeao Sep 15, 2022
8e311cd
copr: don't convert bool to int while comparing json bool with other …
YangKeao Sep 15, 2022
1179131
engine_tirocks: port util (#13462)
BusyJay Sep 15, 2022
7382d4e
tikv_util: introduce future channel (#13407)
BusyJay Sep 15, 2022
32f93fc
multi-rocksdb: avoid mutex deadlock between open_tablet() and create_…
BornChanger Sep 15, 2022
bdfde51
engine: update raft-engine (#13464)
tabokie Sep 15, 2022
7348756
tidb_query_expr: fix the problem that the result of castFloatAsTime i…
mengxin9014 Sep 15, 2022
fd84225
raftstore: set seqno in ApplyRes (#12978)
5kbpers Sep 16, 2022
2a67c47
gc_worker: revert some draft changes in PR#13322 (#13471)
SpadeA-Tang Sep 16, 2022
846b2bd
backup: Add rawkv ttl expired data metric (#13438)
haojinming Sep 16, 2022
6fb3637
gc_worker: make background gc compatible with multi-rocks db (#13402)
SpadeA-Tang Sep 16, 2022
c168aba
log-backup: update for compression type compatibility and config defa…
Leavrth Sep 16, 2022
17fbbd8
engine_tirocks: port iterator and snapshot (#13484)
BusyJay Sep 16, 2022
94bbe68
raftstore-v2: support write proposal (#13388)
BusyJay Sep 16, 2022
bcfbd56
copr: support more regexp functions (#13480)
gengliqi Sep 16, 2022
b5329ee
br: implement/refactor a generic interface for snapshot backup and re…
fengou1 Sep 17, 2022
6ed9d41
storage: refactor flashback to use the MVCC overwriting (#13450)
JmPotato Sep 19, 2022
d9dbf75
br: implement snapshot restore in tikv for ebs based Backup and Resto…
fengou1 Sep 19, 2022
22b46ad
engine: disable raft engine log recycling (#13488)
tabokie Sep 19, 2022
cbc302c
coprocessor: support auto scale read-pool (#13314)
glorv Sep 19, 2022
4cce9e7
raftstore, resolved_ts: clarify the use of term safe_ts and resolved_…
JmPotato Sep 20, 2022
9aa85c9
Add check conditions before compaction filter in RawKV GC (#12938)
ystaticy Sep 20, 2022
032770a
rawkv: Encode ts to apiv2 key in storage instead of causal observer (…
haojinming Sep 20, 2022
5277c5d
actions: use load_data to get the old value in flashback (#13492)
JmPotato Sep 20, 2022
2e11398
gc_worker: make unsafe detroy range compatible with multi-rocks db (#…
SpadeA-Tang Sep 20, 2022
3d075ab
causal_ts: add async func for CausalTsProvider (#13429)
zeminzhou Sep 20, 2022
f55c263
raftstore-v2: support lease read (#13202)
tonyxuqqi Sep 21, 2022
42d3222
br: recovering_mark interface block tikv startup when tikv v6.3.0 con…
fengou1 Sep 21, 2022
4253d27
copr: forbid empty pattern for regexp (#13514)
gengliqi Sep 22, 2022
d0850ce
raftstore, tikv_util: move QueryStats from raftstore to tikv_util com…
zeminzhou Sep 22, 2022
b185492
raftstore: Do not print error log for "region not exist but not tombs…
MyonKeminta Sep 22, 2022
40fc228
cdc: Clean rawkv resolved ts code (#13496)
haojinming Sep 23, 2022
0c76c81
Observer: add some metrics for the waiting queue of snapshot generat…
bufferflies Sep 23, 2022
09f98f1
engine_tirocks: add write batch and perf context (#13509)
BusyJay Sep 23, 2022
585763a
commands: use ReaderWithStats in flashback_to_version command (#13525)
JmPotato Sep 26, 2022
975c054
metrics: fix grafana expr for `tikv_gc_compaction_filtered` (#13536)
Defined2014 Sep 26, 2022
a68a44e
*: strip the RefCell off the LocalReader in ServerRaftStoreRouter (#1…
SpadeA-Tang Sep 27, 2022
a7e8153
tikv_util: make LruCache sound (#13552)
youjiali1995 Sep 28, 2022
c6f4f1c
engine: fix performance issue of deleting files in ranges (#13540)
tabokie Sep 28, 2022
d96b8d1
storage: Rollback all locks to prevent from losing the pessimistic lo…
HuSharp Sep 29, 2022
5bc1fa7
storage: remove histogram about locking key in prewrite (#13527)
sticnarf Sep 29, 2022
9321040
storage: Add new implementation of lock waiting queue (#13486)
MyonKeminta Sep 29, 2022
c48b0cf
bump master version to v6.4.0-alpha (#13499)
Sep 29, 2022
1f0b9bf
raftstore-v2: add basic apply (#13495)
BusyJay Sep 30, 2022
6a78b01
*: Refine interfaces for TiFlash when using TiKV as a component (#13487)
CalvinNeo Sep 30, 2022
e412adf
storage, raftstore, causal-ts: Get snapshot before raw put(delete) to…
zeminzhou Sep 30, 2022
47d8c9e
storage/lock_manager: Add metrics to the new lock waiting queue (#13560)
MyonKeminta Sep 30, 2022
9566107
copr: fix wrong sql mode constants (#13567)
gengliqi Oct 6, 2022
1a9446f
engine_tirocks: add properties (#13558)
BusyJay Oct 9, 2022
6d71c2b
rawkv: Fix unstable test-region-merge (#13580)
pingyu Oct 11, 2022
94c8aa5
raftstore-v2: implement local read for raftstore-v2 (#13375)
SpadeA-Tang Oct 11, 2022
be44dba
log-backup: remove checkpoint V2 from codebase (#13197)
YuJuncen Oct 11, 2022
f702db2
trace peers' availability info on leader side (#13209)
ethercflow Oct 12, 2022
c286b8a
*: Add a Raft admin command to put the region into a locking flashbac…
HuSharp Oct 12, 2022
066a422
channel: early break when fetch nothing (#13516)
BusyJay Oct 12, 2022
2a98883
storage/lock_manager: Avoid stale entries in the new lock waiting que…
MyonKeminta Oct 13, 2022
efc84fc
Json contains push tikv (#13469)
lizhenhuan Oct 13, 2022
11a340c
local_reader: solve the race condition when acquiring the snapshot (#…
SpadeA-Tang Oct 13, 2022
b448214
causal-ts: rename `available-interval` to `alloc-ahead-buffer` (#13597)
pingyu Oct 14, 2022
26b6c3c
local_reader: release snapshot properly (#13605)
SpadeA-Tang Oct 14, 2022
b37c2f6
*: introduce the two-phase kv_flashback_to_version (#13557)
JmPotato Oct 17, 2022
39961b1
raftstore: move check_flashback_state to after check_region_epoch (#1…
JmPotato Oct 17, 2022
571b5a2
test: Fix incorrect rawkv case test_raw_put_key_guard (#13600)
haojinming Oct 17, 2022
13f58a9
tests: refine the flashback raftstore test (#13615)
JmPotato Oct 18, 2022
ed64ed2
resolved_ts: track 1PC (#13579)
hehechen Oct 18, 2022
a63944c
*: fix build with panic engines (#13585)
tabokie Oct 18, 2022
08b5a4a
raftstore-v2: test_read is not stable (#13626)
SpadeA-Tang Oct 19, 2022
da48775
test: Add rawkv empty key/value test (#13636)
haojinming Oct 20, 2022
262c1b8
raftstore-v2: add read handling after apply (#13565)
tonyxuqqi Oct 21, 2022
92aaf95
cdc: observe the slowest resolved ts lag (#13647)
overvenus Oct 21, 2022
71af290
log-backup: Fix Initial Scan Racing (#13628)
YuJuncen Oct 24, 2022
f0c3316
tikv_util: fix panic when there are multiple cgroup2 mountinfos (#13661)
tabokie Oct 24, 2022
7692be4
mvcc: log the mvcc key if default not found error happens (#13659)
cfzjywxk Oct 25, 2022
5d2e706
raftstore-v2: support conf change (#13631)
BusyJay Oct 25, 2022
2c083a4
tests: fix one flaky testcase (#13602)
cosven Oct 25, 2022
7fbbcdc
cdc, resolved_ts: add leadership resolver (#13657)
overvenus Oct 25, 2022
469eab2
raftstore: warm up entry cache before leadership transfer (#13556)
cosven Oct 25, 2022
c74c8ca
raftstore: introduce an observer to control write apply state (#13609)
CalvinNeo Oct 26, 2022
a4dc37b
storage, lock_manager: Use the new lock waiting queue instead of Wait…
MyonKeminta Oct 26, 2022
0f5058e
raftstore: make sure PrepareFlashback will get the latest region meta…
JmPotato Oct 27, 2022
b7880cd
cdc, resolved_ts: reduce allocation in leadership resolver (#13666)
overvenus Oct 28, 2022
d032904
log-backup: added `Debug` output of error to report log (#13686)
YuJuncen Oct 28, 2022
fe61a03
log-backup: fix slow flush in GCP (#13674)
YuJuncen Oct 28, 2022
dea7b05
readpool: update yatp and add new metrics for unified-read-pool (#13489)
glorv Oct 28, 2022
5347073
Raftstore-v2: tablet factory supports temporary split path (#13678)
SpadeA-Tang Oct 31, 2022
e088580
*: prepare for raftstore-v2's split (#13693)
SpadeA-Tang Oct 31, 2022
d9fe2ff
log-backup: set `checkpoint-ts -1` as sevice-safe-point when checkpoi…
joccau Nov 1, 2022
6cf4100
coprocessor_v2: fix incorrect shared library name (#13707)
sticnarf Nov 1, 2022
986bfde
raftstore fix typo (#13681)
zgcbj Nov 1, 2022
26830eb
scheduler: Optimize CPU usage of waking up (#13697)
MyonKeminta Nov 1, 2022
de4cd13
raftstore-v2: add snapshot basic logic in peer storage (#13555)
nolouch Nov 1, 2022
dd4299c
fix typo (#13699)
goldwind-ting Nov 1, 2022
497ae1b
raft_client: Report store unreachable once until being connected agai…
Connor1996 Nov 1, 2022
e1ca10e
txn_types: add info about last change to Lock and Write (#13698)
sticnarf Nov 2, 2022
de73806
raftstore: restrict the total write size of each apply round (#13594)
glorv Nov 2, 2022
9f707fd
storage: calculate last_change_ts in acquire_pessimistic_lock (#13717)
sticnarf Nov 2, 2022
97ab36e
txn: Add lock-with-conflict support to acquire_pessimistic_lock (#13680)
MyonKeminta Nov 2, 2022
7fd31d3
copr, json: support json path range selection (#13645)
YangKeao Nov 3, 2022
e57dc6d
apply: avoid unnecessary clone (#13727)
Connor1996 Nov 3, 2022
e1ba8a2
txn: set last_change_ts only on 6.5+ versions (#13728)
sticnarf Nov 3, 2022
1337692
*: upgrade pprof-rs to v0.11 (#13733)
mornyx Nov 3, 2022
be76c44
Optimize slow-score mechanism to reduce the time-cost on recovery whe…
LykxSassinator Nov 4, 2022
c627407
*: resolve when flashback meets error in the first batch (#13695)
HuSharp Nov 4, 2022
16d1e2a
*: Fix link to TiDB Release Notes (#13718)
yahonda Nov 4, 2022
64fe6ce
raftstore-v2: partially support tablet split (#13689)
SpadeA-Tang Nov 4, 2022
dff7716
cmd: fix raft engine ctl (#13108)
tabokie Nov 7, 2022
9e2305c
storage: fix the flashback dead loop caused by a deleted key (#13744)
JmPotato Nov 7, 2022
9d63323
tidb_query_datatype: Fix Geometry FieldType support (#13652)
dveeden Nov 7, 2022
7598dd2
storage: calculate last_change_ts in prewrite (#13721)
sticnarf Nov 8, 2022
8eaa805
backup: udpate rusoto to support backup to ap-southeast-3 (#13750)
3pointer Nov 8, 2022
2a61f07
debugger: fix compacting raftdb with tikv-ctl (#13742)
mzygQAQ Nov 9, 2022
8831c7d
raftstore: Introduce witness peer (#12972)
Connor1996 Nov 9, 2022
f2e89a4
bump version to 6.5.0-alpha (#13740)
Nov 9, 2022
e87d16d
cdc: remove deprecated config (#13762)
haojinming Nov 10, 2022
0339d51
storage: calculate last_change_ts in rollback (#13749)
sticnarf Nov 10, 2022
fe997db
txn: save last change info in write records (#13759)
sticnarf Nov 10, 2022
60ded89
cdc: set min-ts-interval to 200ms to reduce latency (#12839)
hicqu Nov 11, 2022
d23bea3
raftstore-v2: add proposal conflict checker (#13737)
BusyJay Nov 11, 2022
9c4f0d0
raftstore-v2: make generate snapshot works with checkpoint (#13736)
nolouch Nov 11, 2022
6b61f4a
Add curl command into docker image (#13765)
mikechengwei Nov 14, 2022
23dba4f
raftstore-v2: support tablet split (#13709)
SpadeA-Tang Nov 14, 2022
a80ab98
copr: fix _ pattern in like behavior for old collation (#13785)
YangKeao Nov 15, 2022
68da604
Push Json_valid to tikv (#13572)
lizhenhuan Nov 15, 2022
4407cb1
txn: add a new field `txn_source` in write and lock (#13777)
xiongjiwei Nov 15, 2022
6b240c9
*: update toolchain (#13797)
BusyJay Nov 15, 2022
d58343d
cdc: run CheckLeader in a dedicate thread (#13799)
overvenus Nov 15, 2022
fca5a9e
storage: avoid repeating unnecessary checks on flashback keys (#13801)
JmPotato Nov 16, 2022
2704588
Protect Raft Engine Disk Usage (#13633)
jiayang-zheng Nov 16, 2022
616b440
txn: Add batch-resumed mode for acquire_pessimistic_lock storage comm…
MyonKeminta Nov 16, 2022
65ad2a5
read: fix panic on witness check (#13767)
Connor1996 Nov 17, 2022
7dfb42e
*: update crossbeam-channel to avoid spin at sending side (#13807)
sticnarf Nov 17, 2022
cc7345a
tests: refine the raftstore flashback tests (#13808)
JmPotato Nov 17, 2022
ec42962
cmd: support tikv-ctl to get the regions info within a given key rang…
HuSharp Nov 17, 2022
3179b12
mvcc: skip accumulated locks by a second get (#13784)
sticnarf Nov 18, 2022
be2aec1
test: fix flaky witness test (#13822)
Connor1996 Nov 18, 2022
5a1f110
txn: make `txn_source` be u64 type (#13817)
xiongjiwei Nov 18, 2022
07266ff
resolved_ts: remove the unused CDC sinker (#13795)
JmPotato Nov 21, 2022
b0075db
raftstore-v2: support send/recv tablet snapshot (#13776)
bufferflies Nov 21, 2022
e41dabb
*: make flashback not aware of raftstore router (#13828)
BusyJay Nov 22, 2022
8465f44
mvcc: skip accumulated locks using seek in forward scanner (#13819)
sticnarf Nov 22, 2022
d9ce7d7
backup: backup sub-ranges in one request (#13702)
Leavrth Nov 22, 2022
1c915f3
*: remove legacy code (#13832)
BusyJay Nov 22, 2022
71980d3
*: remove redundant code for prewrite and commit. (#13747)
HuSharp Nov 23, 2022
fd197f0
server: wait for reset-to-version task completion (#13830)
tabokie Nov 23, 2022
101032b
support restoring a batch of KV files (#13786)
joccau Nov 23, 2022
8ce818b
txn: revert "calculate last_change_ts in rollback" (#13834)
sticnarf Nov 23, 2022
3ab299c
tikv_kv: make async_snapshot return future (#13836)
BusyJay Nov 23, 2022
970f562
mvcc: fix get_write may return Delete when skipping versions (#13840)
sticnarf Nov 23, 2022
213e502
raftstore-v2: pd worker (#13773)
tabokie Nov 24, 2022
dc347f9
scheduler: Support keeping some latches for another command when rele…
MyonKeminta Nov 24, 2022
f7ba202
reader: fix the invisible write record flashback bug (#13845)
JmPotato Nov 25, 2022
998cb30
raftstore-v2: support apply snapshot (#13734)
bufferflies Nov 25, 2022
531f7a0
storage: skip accumulated locks on non-existing keys (#13820)
sticnarf Nov 25, 2022
c26a7cd
storage: introduce hint_min_ts to speed up the flashback progress (#1…
JmPotato Nov 28, 2022
bfe2965
scheduler: Support resuming after meeting lock for AcquirePessimistic…
MyonKeminta Nov 28, 2022
31ca8b9
tikv_utils: make retry returns a `Send` future even the result type i…
YuJuncen Nov 29, 2022
2f4374e
filter out invalid k-v events when applying kv-file on PiTR (#13852)
joccau Nov 29, 2022
f8a3976
cdc: filter out the event cause by cdc write (#13796)
xiongjiwei Nov 29, 2022
d23618e
cop: support batch coprocessor processing in tikv (#13850)
cfzjywxk Nov 29, 2022
c1aceb0
server, storage: make flashback compatible with resolved_ts (#13823)
JmPotato Nov 29, 2022
916d513
cop: set the error field properly for the batch cop task response (#1…
cfzjywxk Nov 29, 2022
05aed39
cop: disable the coprocessor cache path for batched task processing (…
cfzjywxk Nov 30, 2022
2e18d0d
tikv_kv: make async_write return stream (#13854)
BusyJay Nov 30, 2022
fbaaab3
log-backup: implement subscribe flushing (#13810)
YuJuncen Nov 30, 2022
372ea1a
pitr: support skipping download kv files when pitr (#13802)
joccau Nov 30, 2022
e52eb4d
fix the issue that TiKV starts failed. (#13863)
joccau Dec 1, 2022
0f1d45a
tikv_kv: introduce raft extension (#13864)
BusyJay Dec 1, 2022
4df0ad4
log-backup: use `openssl` to replace `rustls` implement in backup-str…
YuJuncen Dec 1, 2022
6bccbf8
import: cache storage when possible (#13783)
YuJuncen Dec 1, 2022
8d9698f
storage: Unify the flashback reader and fix the start_key bug (#13860)
HuSharp Dec 1, 2022
a4a4a43
scheduler/lock_manager: Handle the corner case that resumable pessims…
MyonKeminta Dec 1, 2022
7a3764f
pd-client: pd client version 2 (#13696)
tabokie Dec 2, 2022
4b4fc43
raftstore: allow a read-only flashback request to be propsed (#13871)
JmPotato Dec 2, 2022
76844d2
log_backup: fix pitr panic (#13875)
YuJuncen Dec 5, 2022
e0c9c1a
storage: Resolve EBS flashback unlimit range (#13881)
HuSharp Dec 5, 2022
c8250e5
raftstore: split raft write batch on 1GiB limit (#13872)
tabokie Dec 5, 2022
b79b86e
log-backup: make the safepoint lifetime 24hours (#13885)
YuJuncen Dec 5, 2022
7d4b6c6
pd_client: move ReadableDuration to failpoint (#13878)
HuSharp Dec 5, 2022
280d53b
raftstore: remove is_in_flashback field in peer fsm (#13877)
JmPotato Dec 5, 2022
909787e
raft_engine: remove redundant methods (#13900)
BusyJay Dec 7, 2022
044aa15
*: Update sysinfo dependency (#13385)
dveeden Dec 7, 2022
e9eb8c9
backup: allow to backup during the flashback (#13895)
JmPotato Dec 7, 2022
d7096eb
raftstore-v2: use snapshot to initialize split (#13886)
BusyJay Dec 7, 2022
0d5a292
*: always share block cache (#13903)
BusyJay Dec 7, 2022
3122786
resolved_ts: pass full safe_ts timestamp to observer (#13897)
hehechen Dec 8, 2022
3e0b8dd
gc_worker: disable gc if have negative ratio (#13904)
YuJuncen Dec 8, 2022
daa0c8f
log-backup:Retry to get tasks with etcd-cli from etcd when TiKV start…
joccau Dec 8, 2022
56ed2f6
metrics: fix coprocessor cpu alert (#10878)
tabokie Dec 9, 2022
97585fb
Improve readability through syntax sugar (#13899)
v01dstar Dec 9, 2022
0921ad0
*: clean up tablet factory (#13912)
BusyJay Dec 9, 2022
d86a449
raftstore-v2: add DATA_PREFIX (#13917)
BusyJay Dec 9, 2022
d20569b
Raftstore-v2: transfer leader (#13793)
SpadeA-Tang Dec 12, 2022
fa6122e
*: add raftstore v2 only tablet optimization (#13924)
BusyJay Dec 13, 2022
69cdc1e
raftstore-v2: deny unused (#13933)
BusyJay Dec 13, 2022
931cf7f
*: Update security policy (#13929)
dveeden Dec 13, 2022
5f22825
engine_trait: introduce flush state (#13925)
BusyJay Dec 14, 2022
cfdb31f
async-io: make v2 a log batch (#13935)
BusyJay Dec 14, 2022
98e8bfb
chore: bump version to v6.6.0-alpha (#13938)
Dec 14, 2022
e591a41
storage: Update lock wait info after acquiring locks (#13902)
MyonKeminta Dec 16, 2022
87b0eaf
ratstore-v2: strip ts from split keys before propose (#13948)
SpadeA-Tang Dec 16, 2022
416f7b7
raftstore-v2: introduce apply trace (#13939)
BusyJay Dec 17, 2022
77e4896
br: enlarge the raft client backoff in recovery mode since ebs restor…
fengou1 Dec 19, 2022
a069c1b
log-backup: make PITR available when using partial cert chain (#13961)
YuJuncen Dec 19, 2022
a0cff58
Makefile: check before sort deps (#13951)
BusyJay Dec 19, 2022
27fa5bb
Skip write `prewrite_lock` in flashback locks (#13960)
HuSharp Dec 19, 2022
545ffb8
*: impl raftkv2 snapshot and write (#13957)
BusyJay Dec 19, 2022
70e1525
engine: adapt engine metrics for multi-rocks (#13942)
tabokie Dec 20, 2022
679c773
raftstore-v2: fix compilation errors. (#13969)
LykxSassinator Dec 20, 2022
99c70a3
*: implement other essential functions for raftkv2 (#13967)
BusyJay Dec 21, 2022
186e242
raftstore-v2: implement a simplified version of CoprocessorHost (#13901)
SpadeA-Tang Dec 21, 2022
fbff71d
log-backup: enhance logs (#13913)
YuJuncen Dec 22, 2022
0cc15e4
Raftstore-v2: txn_ext and bucket_meta of RegionSnapshot should be ini…
SpadeA-Tang Dec 22, 2022
36570b8
raftstore-v2: make coprocessor work (#13978)
BusyJay Dec 22, 2022
a499caf
import: log L0 SST ranges when too many files in ingest (#13979)
lance6716 Dec 22, 2022
90505f5
*: support start with raftkv2 (#13981)
BusyJay Dec 23, 2022
a422de9
*: make gc not write db directly (#13982)
BusyJay Dec 23, 2022
8864e9b
v2: fix several panics (#13986)
BusyJay Dec 24, 2022
8ec3cea
raftstore-v2: fix several errors (#13988)
BusyJay Dec 27, 2022
5806cd1
support check leader (#13987)
BusyJay Dec 27, 2022
929b329
fix the bug that send mistake peer snapshot (#13915)
bufferflies Dec 27, 2022
f21361d
raftstore-v2: compact and gc raft logs (#13846)
tabokie Dec 27, 2022
7be952a
log-backup: applied some change to make better RPO (#13940)
YuJuncen Dec 27, 2022
c3903b8
server: improve the ergonomics of sharing things between tablets (#13…
tabokie Dec 27, 2022
77c2199
raftstore-v2: gc tablets (#13974)
tabokie Dec 27, 2022
0404a7c
raftstore-v2: purge raft engine (#13993)
tabokie Dec 27, 2022
25261c8
raftstore-v2: cleanup stale tablet on restart (#13994)
BusyJay Dec 27, 2022
5b5da3a
change by tikv Signed-off-by: hongyunyan <[email protected]>
hongyunyan Jan 4, 2023
1e889fc
fix format
hongyunyan Jan 4, 2023
99bda73
fix compile
hongyunyan Jan 4, 2023
028c154
fix compile
hongyunyan Jan 4, 2023
eab3e0c
fix test
hongyunyan Jan 4, 2023
89ee249
fix test
hongyunyan Jan 5, 2023
b210b3f
fix test
hongyunyan Jan 5, 2023
444b419
fix test
hongyunyan Jan 5, 2023
3457613
fix test
hongyunyan Jan 5, 2023
7525c88
fix test
hongyunyan Jan 5, 2023
c23455e
fix test
hongyunyan Jan 6, 2023
a4e4358
for clone
hongyunyan Jan 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tikv"
version = "6.5.0-alpha"
version = "6.6.0-alpha"
authors = ["The TiKV Authors"]
description = "A distributed transactional key-value database powered by Rust and Raft"
license = "Apache-2.0"
Expand Down Expand Up @@ -137,6 +137,7 @@ protobuf = { version = "2.8", features = ["bytes"] }
raft = { version = "0.7.0", default-features = false, features = ["protobuf-codec"] }
raft_log_engine = { workspace = true }
raftstore = { workspace = true, features = ["engine_rocks"] }
raftstore-v2 = { workspace = true }
rand = "0.7.3"
regex = "1.3"
resource_metering = { workspace = true }
Expand All @@ -154,7 +155,7 @@ smallvec = "1.4"
sst_importer = { workspace = true }
strum = { version = "0.20", features = ["derive"] }
sync_wrapper = "0.1.1"
sysinfo = "0.16"
sysinfo = "0.26"
tempfile = "3.0"
thiserror = "1.0"
tidb_query_aggr = { workspace = true }
Expand Down Expand Up @@ -339,7 +340,7 @@ pd_client = { path = "components/pd_client" }
profiler = { path = "components/profiler" }
raft_log_engine = { path = "components/raft_log_engine" }
raftstore = { path = "components/raftstore", default-features = false }
raftstore_v2 = { path = "components/raftstore-v2", default-features = false }
raftstore-v2 = { path = "components/raftstore-v2", default-features = false }
resolved_ts = { path = "components/resolved_ts" }
resource_metering = { path = "components/resource_metering" }
security = { path = "components/security" }
Expand Down
4 changes: 3 additions & 1 deletion security/SECURITY.md → SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ The following are the versions that we support for security updates

| Version | Supported |
| ------- | ------------------ |
| 6.x | :white_check_mark: |
| 5.x | :white_check_mark: |
| 4.x | :white_check_mark: |
| 3.x | :white_check_mark: |
| 2.x | :white_check_mark: |
Expand Down Expand Up @@ -94,4 +96,4 @@ IvCICV7zG1cyuM/Z2Y7/TJ+upvahP46nM3s3G15b8FYuTSmRN1Kp9+mBt2BHqOy1
ulx+VF4Lf9n3ydf593Nha9bMJ/rnSp01
=XbYK
-----END PGP PUBLIC KEY BLOCK-----
```
```
35 changes: 13 additions & 22 deletions cmd/tikv-ctl/src/executor.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0.

use std::{
borrow::ToOwned, cmp::Ordering, path::PathBuf, pin::Pin, str, string::ToString, sync::Arc,
time::Duration, u64,
borrow::ToOwned, cmp::Ordering, pin::Pin, str, string::ToString, sync::Arc, time::Duration, u64,
};

use encryption_export::data_key_manager_from_config;
Expand All @@ -28,7 +27,10 @@ use security::SecurityManager;
use serde_json::json;
use tikv::{
config::{ConfigController, TikvConfig},
server::debug::{BottommostLevelCompaction, Debugger, RegionInfo},
server::{
debug::{BottommostLevelCompaction, Debugger, RegionInfo},
KvEngineFactoryBuilder,
},
};
use tikv_util::escape;

Expand All @@ -45,7 +47,6 @@ type MvccInfoStream = Pin<Box<dyn Stream<Item = Result<(Vec<u8>, MvccInfo), Stri
pub fn new_debug_executor(
cfg: &TikvConfig,
data_dir: Option<&str>,
skip_paranoid_checks: bool,
host: Option<&str>,
mgr: Arc<SecurityManager>,
) -> Box<dyn DebugExecutor> {
Expand All @@ -55,47 +56,37 @@ pub fn new_debug_executor(

// TODO: perhaps we should allow user skip specifying data path.
let data_dir = data_dir.unwrap();
let kv_path = cfg.infer_kv_engine_path(Some(data_dir)).unwrap();

let key_manager = data_key_manager_from_config(&cfg.security.encryption, &cfg.storage.data_dir)
.unwrap()
.map(Arc::new);

let cache = cfg.storage.block_cache.build_shared_cache();
let shared_block_cache = cache.is_some();
let env = cfg
.build_shared_rocks_env(key_manager.clone(), None /* io_rate_limiter */)
.unwrap();

let mut kv_db_opts = cfg.rocksdb.build_opt();
kv_db_opts.set_env(env.clone());
kv_db_opts.set_paranoid_checks(!skip_paranoid_checks);
let kv_cfs_opts = cfg
.rocksdb
.build_cf_opts(&cache, None, cfg.storage.api_version());
let kv_path = PathBuf::from(kv_path).canonicalize().unwrap();
let kv_path = kv_path.to_str().unwrap();
let mut kv_db = match new_engine_opt(kv_path, kv_db_opts, kv_cfs_opts) {
let factory = KvEngineFactoryBuilder::new(env.clone(), cfg, cache)
.lite(true)
.build();
let kv_db = match factory.create_shared_db(data_dir) {
Ok(db) => db,
Err(e) => handle_engine_error(e),
};
kv_db.set_shared_block_cache(shared_block_cache);

let cfg_controller = ConfigController::default();
if !cfg.raft_engine.enable {
let mut raft_db_opts = cfg.raftdb.build_opt();
raft_db_opts.set_env(env);
let raft_db_cf_opts = cfg.raftdb.build_cf_opts(&cache);
let raft_db_opts = cfg.raftdb.build_opt(env, None);
let raft_db_cf_opts = cfg.raftdb.build_cf_opts(factory.block_cache());
let raft_path = cfg.infer_raft_db_path(Some(data_dir)).unwrap();
if !db_exist(&raft_path) {
error!("raft db not exists: {}", raft_path);
tikv_util::logger::exit_process_gracefully(-1);
}
let mut raft_db = match new_engine_opt(&raft_path, raft_db_opts, raft_db_cf_opts) {
let raft_db = match new_engine_opt(&raft_path, raft_db_opts, raft_db_cf_opts) {
Ok(db) => db,
Err(e) => handle_engine_error(e),
};
raft_db.set_shared_block_cache(shared_block_cache);
let debugger = Debugger::new(Engines::new(kv_db, raft_db), cfg_controller);
Box::new(debugger) as Box<dyn DebugExecutor>
} else {
Expand Down Expand Up @@ -383,7 +374,7 @@ pub trait DebugExecutor {
to_config: &TikvConfig,
mgr: Arc<SecurityManager>,
) {
let rhs_debug_executor = new_debug_executor(to_config, to_data_dir, false, to_host, mgr);
let rhs_debug_executor = new_debug_executor(to_config, to_data_dir, to_host, mgr);

let r1 = self.get_region_info(region);
let r2 = rhs_debug_executor.get_region_info(region);
Expand Down
23 changes: 11 additions & 12 deletions cmd/tikv-ctl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn main() {

// Initialize configuration and security manager.
let cfg_path = opt.config.as_ref();
let cfg = cfg_path.map_or_else(
let mut cfg = cfg_path.map_or_else(
|| {
let mut cfg = TikvConfig::default();
cfg.log.level = tikv_util::logger::get_level_by_string("warn")
Expand Down Expand Up @@ -249,9 +249,8 @@ fn main() {
.exit();
}

let skip_paranoid_checks = opt.skip_paranoid_checks;
let debug_executor =
new_debug_executor(&cfg, data_dir, skip_paranoid_checks, host, Arc::clone(&mgr));
cfg.rocksdb.paranoid_checks = Some(!opt.skip_paranoid_checks);
let debug_executor = new_debug_executor(&cfg, data_dir, host, Arc::clone(&mgr));

match cmd {
Cmd::Print { cf, key } => {
Expand Down Expand Up @@ -643,7 +642,7 @@ fn compact_whole_cluster(
.name(format!("compact-{}", addr))
.spawn_wrapper(move || {
tikv_alloc::add_thread_memory_accessor();
let debug_executor = new_debug_executor(&cfg, None, false, Some(&addr), mgr);
let debug_executor = new_debug_executor(&cfg, None, Some(&addr), mgr);
for cf in cfs {
debug_executor.compact(
Some(&addr),
Expand Down Expand Up @@ -682,20 +681,20 @@ fn read_fail_file(path: &str) -> Vec<(String, String)> {
list
}

fn run_ldb_command(args: Vec<String>, cfg: &TikvConfig) {
fn build_rocks_opts(cfg: &TikvConfig) -> engine_rocks::RocksDbOptions {
let key_manager = data_key_manager_from_config(&cfg.security.encryption, &cfg.storage.data_dir)
.unwrap()
.map(Arc::new);
let env = get_env(key_manager, None /* io_rate_limiter */).unwrap();
let mut opts = cfg.rocksdb.build_opt();
opts.set_env(env);
cfg.rocksdb.build_opt(&cfg.rocksdb.build_resources(env))
}

engine_rocks::raw::run_ldb_tool(&args, &opts);
fn run_ldb_command(args: Vec<String>, cfg: &TikvConfig) {
engine_rocks::raw::run_ldb_tool(&args, &build_rocks_opts(cfg));
}

fn run_sst_dump_command(args: Vec<String>, cfg: &TikvConfig) {
let opts = cfg.rocksdb.build_opt();
engine_rocks::raw::run_sst_dump_tool(&args, &opts);
engine_rocks::raw::run_sst_dump_tool(&args, &build_rocks_opts(cfg));
}

fn print_bad_ssts(data_dir: &str, manifest: Option<&str>, pd_client: RpcClient, cfg: &TikvConfig) {
Expand All @@ -714,7 +713,7 @@ fn print_bad_ssts(data_dir: &str, manifest: Option<&str>, pd_client: RpcClient,

let stderr = BufferRedirect::stderr().unwrap();
let stdout = BufferRedirect::stdout().unwrap();
let opts = cfg.rocksdb.build_opt();
let opts = build_rocks_opts(cfg);

match run_and_wait_child_process(|| engine_rocks::raw::run_sst_dump_tool(&args, &opts)) {
Ok(code) => {
Expand Down
Loading