Distributed transactional key-value database, originally created to complement TiDB
891 matches across 12 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | Cargo.toml | 221 | sysinfo = { git = "https://github.com/tikv/sysinfo", branch = "0.26-fix-cpu" } |
| LOW | deny.toml | 61 | # See https://github.com/sfackler/rust-openssl/pull/2266 |
| LOW | deny.toml | 81 | # also upgrade the OpenSSL to v3.x which causes performance degradation. |
| LOW | cmd/tikv-ctl/src/cmd.rs | 421 | /// The target region |
| LOW | cmd/tikv-ctl/src/cmd.rs | 561 | #[structopt(short = "v")] |
| LOW | cmd/tikv-ctl/src/cmd.rs | 581 | /// fork-readonly-tikv is for creating a tikv-server agent based on a |
| LOW | cmd/tikv-ctl/src/cmd.rs | 601 | /// |
| LOW | cmd/tikv-ctl/src/cmd.rs | 781 | #[structopt(long)] |
| LOW | tests/failpoints/mod.rs | 1 | // Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0. |
| LOW | tests/failpoints/cases/test_snap.rs | 1181 | // k2 (split point) |
| LOW | tests/failpoints/cases/test_hibernate.rs | 361 | rx.recv_timeout(Duration::from_secs(1)).unwrap(), |
| LOW | tests/failpoints/cases/test_conf_change.rs | 201 | cluster.must_put(key, value); |
| LOW | tests/failpoints/cases/test_replica_read.rs | 341 | router.send_raft_message(read_index_msg).unwrap(); |
| LOW | tests/failpoints/cases/test_disk_snap_br.rs | 1 | // Copyright 2023 TiKV Project Authors. Licensed under Apache-2.0. |
| LOW | tests/failpoints/cases/test_engine.rs | 61 | // note: before rocksdb/pull/347, lock is called before on_memtable_sealed. |
| LOW | tests/failpoints/cases/test_split_region.rs | 581 | // [k2, +∞) │ │ │ │ │ │ |
| LOW | tests/failpoints/cases/test_split_region.rs | 1441 | fail::remove("on_apply_batch_split"); |
| LOW | tests/failpoints/cases/test_early_apply.rs | 101 | /// between restarting. However, this guarantee can be broken by |
| LOW | tests/failpoints/cases/test_sst_ingest.rs | 21 | use test_raftstore::*; |
| LOW | tests/failpoints/cases/test_merge.rs | 961 | |
| LOW | tests/failpoints/cases/test_merge.rs | 1061 | } |
| LOW | tests/failpoints/cases/test_stale_read.rs | 261 | assert_ne!(leader1.get_store_id(), leader1000.get_store_id()); |
| LOW | tests/failpoints/cases/test_stale_read.rs | 281 | // Region 1000 F L F |
| LOW | tests/integrations/raftstore/test_snap.rs | 281 | must_get_equal(&cluster.get_engine(3), b"k11", b"v11"); |
| LOW | tests/integrations/raftstore/test_stale_peer.rs | 21 | /// - Peer B gets down. And then A adds D, E, F into the cluster. |
| LOW | tests/integrations/raftstore/test_stale_peer.rs | 101 | let mut cluster = new_server_cluster(0, count); |
| LOW | tests/integrations/raftstore/test_unsafe_recovery.rs | 1381 | assert_eq!(cluster.must_get(b"k4"), Some(b"v4".to_vec())); |
| LOW | tests/integrations/raftstore/test_lease_read.rs | 21 | // A helper function for testing the lease reads and lease renewing. |
| LOW | tests/integrations/raftstore/test_lease_read.rs | 661 | /// 1. Add heartbeat msg filter. |
| LOW | tests/integrations/raftstore/test_bootstrap.rs | 281 | let msg = PeerMsg::FlushBeforeClose { tx }; |
| LOW | tests/integrations/storage/test_titan.rs | 301 | // L5: [delete(a_7)] |
| LOW | tests/integrations/storage/test_storage.rs | 921 | |
| LOW | etc/config-template.toml | 1 | ## TiKV config template |
| LOW | etc/config-template.toml | 21 | ## Use abort when TiKV panic. By default TiKV will use _exit() on panic, in that case |
| LOW | etc/config-template.toml | 41 | ## this threshold, it can squeeze some internal components (e.g. evicting cached Raft entries) |
| LOW | etc/config-template.toml | 61 | # background-read-bandwidth = "0B" |
| LOW | etc/config-template.toml | 81 | ## max log file keep days |
| LOW | etc/config-template.toml | 101 | |
| LOW | etc/config-template.toml | 121 | ## The following configurations only take effect when `use-unified-pool` is false. |
| LOW | etc/config-template.toml | 141 | ## Size of the stack for each thread in the thread pool. |
| LOW | etc/config-template.toml | 161 | # max-tasks-per-worker-normal = 2000 |
| LOW | etc/config-template.toml | 181 | ## Listening address. |
| LOW | etc/config-template.toml | 201 | ## Size of the thread pool for the gRPC server. |
| LOW | etc/config-template.toml | 221 | |
| LOW | etc/config-template.toml | 241 | ## By default, it will be set to 12.5% of the available memory of TiKV. |
| LOW | etc/config-template.toml | 261 | ## If handle time is larger than the threshold, it will print slow log in endpoint. |
| LOW | etc/config-template.toml | 281 | |
| LOW | etc/config-template.toml | 301 | |
| LOW | etc/config-template.toml | 321 | ## It is recommended to turn on shared block cache. Since only the total cache size need to be |
| LOW | etc/config-template.toml | 341 | ## Support change dynamically. |
| LOW | etc/config-template.toml | 361 | ## in one second. Internally it prefers throttling background operations over foreground |
| LOW | etc/config-template.toml | 381 | |
| LOW | etc/config-template.toml | 401 | ## can improve TiKV performance. |
| LOW | etc/config-template.toml | 421 | ## Store min resolved ts tick interval for reporting to PD. |
| LOW | etc/config-template.toml | 441 | # raft-log-gc-tick-interval = "3s" |
| LOW | etc/config-template.toml | 461 | ## How long the peer will be considered down and reported to PD when it hasn't been active for this |
| LOW | etc/config-template.toml | 481 | # region-compact-min-redundant-rows = 50000 |
| LOW | etc/config-template.toml | 501 | ## Use how many threads to handle log apply |
| LOW | etc/config-template.toml | 521 | # split-region-on-table = false |
| LOW | etc/config-template.toml | 541 | |
| 700 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | components/pd_client/src/client_v2.rs | 499 | let env = self.raw_client.core.context.connector.env.clone(); |
| CRITICAL | components/raftstore/src/store/fsm/store.rs | 1017 | self.previous_append = self.poll_ctx.raft_metrics.ready.append.get(); |
| CRITICAL | components/raftstore/src/store/fsm/store.rs | 1018 | self.previous_message = self.poll_ctx.raft_metrics.ready.message.get(); |
| CRITICAL | components/raftstore/src/store/fsm/store.rs | 1019 | self.previous_snapshot = self.poll_ctx.raft_metrics.ready.snapshot.get(); |
| CRITICAL | components/raftstore/src/store/fsm/store.rs | 2401 | self.ctx.raft_metrics.message_dropped.stale_msg.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/store.rs | 2550 | self.ctx.raft_metrics.message_dropped.region_overlap.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 876 | self.ctx.raft_metrics.ready.propose_delay.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 963 | target_index: self.fsm.peer.raft_group.raft.raft_log.last_index(), |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1004 | target_index: self.fsm.peer.raft_group.raft.raft_log.last_index(), |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1058 | self.fsm.peer.raft_group.raft.raft_log.last_index() |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1096 | let target_index = self.fsm.peer.raft_group.raft.raft_log.last_index(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1220 | let pending_admin = self.fsm.peer.raft_group.raft.has_pending_conf() |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1790 | self.fsm.peer.raft_group.raft.election_timeout() * 2 |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1796 | } else if self.fsm.peer.raft_group.raft.promotable() |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1811 | self.fsm.peer.raft_group.raft.randomized_election_timeout() |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1845 | if self.fsm.peer.raft_group.raft.r.raft_log.last_index() |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1932 | self.fsm.peer.raft_group.raft.set_check_quorum(true); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 1974 | self.fsm.peer.raft_group.raft.set_check_quorum(false); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 2022 | self.fsm.peer.raft_group.raft.set_check_quorum(true); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 2024 | if self.fsm.peer.raft_group.raft.promotable() { |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 2104 | for (id, vote) in self.fsm.peer.raft_group.raft.prs().votes() { |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 2330 | self.ctx.raft_metrics.ready.has_ready_region.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 2745 | self.ctx.raft_metrics.propose.unsafe_read_index.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 2879 | self.ctx.raft_metrics.message_dropped.disk_full.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 2890 | self.ctx.raft_metrics.message_dropped.non_witness.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3002 | self.ctx.raft_metrics.message_dropped.stale_msg.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3177 | for (peer_id, p) in self.fsm.peer.raft_group.raft.prs().iter() { |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3258 | self.fsm.peer.raft_group.raft.ping(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3445 | self.ctx.raft_metrics.message_dropped.stale_msg.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3474 | None => self.ctx.raft_metrics.message_dropped.applying_snap.inc(), |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3581 | self.ctx.raft_metrics.message_dropped.stale_msg.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3692 | self.ctx.raft_metrics.message_dropped.region_no_peer.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3722 | self.ctx.raft_metrics.message_dropped.stale_msg.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3757 | self.ctx.raft_metrics.message_dropped.region_overlap.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 3820 | self.ctx.raft_metrics.message_dropped.region_overlap.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 4101 | None => self.ctx.raft_metrics.message_dropped.applying_snap.inc(), |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 4467 | if cp.index >= self.fsm.peer.raft_group.raft.raft_log.first_index() { |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 4676 | let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5455 | let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5578 | self.fsm.peer.raft_group.raft.clear_commit_group(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5579 | self.fsm.peer.raft_group.raft.assign_commit_groups(gb); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5754 | let first_index = self.fsm.peer.raft_group.raft.r.raft_log.first_index(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5930 | self.ctx.raft_metrics.invalid_proposal.force_leader.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5960 | self.ctx.raft_metrics.invalid_proposal.not_leader.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5972 | self.ctx.raft_metrics.invalid_proposal.witness.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5989 | self.ctx.raft_metrics.invalid_proposal.witness.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 5996 | self.ctx.raft_metrics.invalid_proposal.non_witness.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 6025 | self.ctx.raft_metrics.invalid_proposal.stale_command.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 6037 | self.ctx.raft_metrics.invalid_proposal.epoch_not_match.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 6286 | for (peer_id, p) in self.fsm.peer.raft_group.raft.prs().iter() { |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 6350 | self.ctx.raft_metrics.raft_log_gc_skipped.reserve_log.inc(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 6456 | self.fsm.peer.request_index = self.fsm.peer.raft_group.raft.raft_log.last_index(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 7141 | let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 7152 | let transferring_leader = self.fsm.peer.raft_group.raft.lead_transferee.is_some(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 7411 | let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write(); |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 7499 | if self.fsm.peer.consistency_state.hash.is_empty() { |
| CRITICAL | components/raftstore/src/store/fsm/peer.rs | 7527 | && !self.fsm.peer.consistency_state.hash.is_empty() |
| CRITICAL | components/raftstore-v2/src/operation/query/mod.rs | 91 | self.store_ctx.raft_metrics.propose.local_read.inc(); |
| CRITICAL | components/server/src/server2.rs | 546 | self.core.config.resource_metering.precision.as_millis(), |
| CRITICAL | components/server/src/server2.rs | 560 | self.core.config.resource_metering.receiver_address.clone(), |
| 23 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | etc/config-template.toml | 17 | ## Enable io snoop which utilize eBPF to get accurate disk io of TiKV |
| MEDIUM | …mponents/raftstore/src/coprocessor/split_check/keys.rs | 164 | // if bucket checker using scan is added, to utilize the scan, |
| MEDIUM | components/raftstore/src/store/config.rs | 334 | /// from entry cache, if they utilize memory more than |
| MEDIUM | components/raftstore/src/store/fsm/peer.rs | 4552 | // to utilize `collect_pending_peers` in `heartbeat_pd` to avoid |
| MEDIUM | components/snap_recovery/src/data_resolver.rs | 191 | // batch) a more robust test need to figure out what is best. |
| MEDIUM | components/resolved_ts/src/resolver.rs | 97 | // The region read progress used to utilize `resolved_ts` to serve stale read request |
| MEDIUM | components/causal_ts/src/tso.rs | 136 | /// 2. Fully utilize cached TSO when some regions require latest TSO (e.g. in |
| MEDIUM | components/tidb_query_aggr/src/lib.rs | 84 | // However current aggregation executor cannot utilize it. |
| MEDIUM | scripts/check-bins.py | 4 | # utilize sse4.2 extensions. |
| MEDIUM | src/server/config.rs | 243 | /// or dropped, if they utilize memory more than |
| MEDIUM | src/server/gc_worker/compaction_filter.rs | 825 | // won't utilize much CPU. So always perform GC at the bottommost level |
| MEDIUM | src/storage/txn/actions/common.rs | 39 | // Note that the scan can also utilize `last_change`. So once it finds a LOCK |
| MEDIUM | src/storage/mvcc/reader/scanner/backward.rs | 302 | // we don't need to seek any more and we can just utilize `last_version`. |
| MEDIUM | src/storage/raw/store.rs | 24 | // TODO: refactor to utilize generic type `KvFormat` and eliminate matching |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/failpoints/cases/test_snap.rs | 1184 | // ───────────────────┼────────────────── |
| MEDIUM | tests/failpoints/cases/test_split_region.rs | 578 | // ┌───────────┐ ┌───────────┐ ┌───────────┐ |
| MEDIUM | tests/failpoints/cases/test_split_region.rs | 582 | // ───────────────────┼───────────┼──┼───────────┼──┼───────────┼── |
| MEDIUM | tests/failpoints/cases/test_split_region.rs | 586 | // └───────────┘ └───────────┘ └───────────┘ |
| MEDIUM | components/backup-stream/src/metrics.rs | 20 | // ┌─────────┐ ┌────────┐ ┌───────┐ |
| MEDIUM | components/backup-stream/src/metrics.rs | 21 | // │ RUNNING ├──────► PAUSED ├──────► ERROR │ |
| MEDIUM | components/backup-stream/src/metrics.rs | 23 | // └───────────────┴───────────────┘ |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/failpoints/cases/test_storage.rs | 2444 | // Step 1: T1 acquires an exclusive lock. |
| LOW | tests/failpoints/cases/test_storage.rs | 2447 | // Step 2: T2 (legacy) tries to acquire an exclusive lock, gets blocked. |
| LOW | tests/failpoints/cases/test_storage.rs | 2469 | // Step 3: T3 (resumable) tries to acquire an exclusive lock, gets blocked. |
| LOW | tests/failpoints/cases/test_storage.rs | 2473 | // Step 4: Release T1's exclusive lock. |
| LOW | tests/failpoints/cases/test_storage.rs | 2478 | // Step 5: T4 acquires a shared lock before T3 resumes. |
| LOW | tests/failpoints/cases/test_storage.rs | 2482 | // Step 6: Remove the pause to allow delayed wake up, T3 will be woken up |
| LOW | tests/failpoints/cases/test_storage.rs | 2487 | // Step 7: Now T3's AcquirePessimisticLockResumed is about to execute. |
| LOW | tests/integrations/server/raft_client.rs | 456 | // Step 1: Send messages to establish connections for stores 1, 2, 3 |
| LOW | tests/integrations/server/raft_client.rs | 481 | // Step 2: Add more stores (4, 5) to test dynamic store detection |
| LOW | src/storage/mvcc/reader/scanner/forward.rs | 233 | // In SI, we need to check if the lock will cause conflict. |
| LOW | src/storage/mvcc/reader/scanner/forward.rs | 251 | // key that does not have a write. In SI, we need to check if the |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | metrics/grafana/common.py | 1016 | # Fix grafana heatmap migration panic if options is null. |
| HIGH | metrics/grafana/common.py | 1195 | "matcher": {"id": "byName", "options": "Last (not null)"}, |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | metrics/grafana/common.py | 162 | def skip_default_instance_selector(self) -> "Expr": |
| LOW | metrics/grafana/common.py | 1050 | def graph_panel_histogram_quantiles( |
| LOW | metrics/grafana/common.py | 1146 | def heatmap_panel_graph_panel_histogram_quantile_pairs( |
| LOW | scripts/check-build-opts.py | 67 | def cargo_check_test_engines_ext(kv_engine, raft_engine): |
| LOW | scripts/check-build-opts.py | 70 | def cargo_test_test_engines_ext(kv_engine, raft_engine): |
| LOW | scripts/check-build-opts.py | 73 | def cargo_run_test_engines_ext(cmd, extra_args, kv_engine, raft_engine): |
| LOW | scripts/check-bins.py | 95 | def is_openssl_vendored_enabled(features): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | …tstore-v2/src/operation/command/admin/merge/prepare.rs | 228 | /// - Target region epoch as requested is identical with the local version. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | etc/config-template.toml | 278 | ## In most cases you can use the default value. When importing data, you can set it to a larger |
| MEDIUM | components/raftstore/src/store/config.rs | 631 | // the log commit duration is less than 1s. Feel free to adjust |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | etc/config-template.toml | 299 | ## Set it to 0 will cause no space is reserved at all. It's generally used for tests. |
| LOW | etc/config-template.toml | 305 | ## Set it to 0 will cause no space is reserved at all. It's generally used for tests. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | metrics/grafana/common.py | 1 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | scripts/check-bins.py | 27 |