Repository Analysis

tikv/tikv

Distributed transactional key-value database, originally created to complement TiDB

2.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of tikv/tikv, a Rust project with 16,758 GitHub stars. SynthScan v2.0 examined 710,151 lines of code across 1473 source files, recording 937 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 2.3 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

2.3
Adjusted Score
2.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
16.8K
Stars
Rust
Language
710.2K
Lines of Code
1.5K
Files
937
Pattern Hits
2026-07-14
Scan Date
0.06
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 84HIGH 3MEDIUM 24LOW 826

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 937 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block778 hits · 736 pts
SeverityFileLineSnippetContext
LOWCargo.toml221# Remove this when a new version is release. We need to solve rust-lang/cmake-rs#143.COMMENT
LOWdeny.toml61 # See https://github.com/sfackler/rust-openssl/pull/2266COMMENT
LOWdeny.toml81 # also upgrade the OpenSSL to v3.x which causes performance degradation.COMMENT
LOWdeny.toml101 "RUSTSEC-2026-0097",COMMENT
LOWcmd/tikv-ctl/src/cmd.rs421 },COMMENT
LOWcmd/tikv-ctl/src/cmd.rs541 /// output file pathCOMMENT
LOWcmd/tikv-ctl/src/cmd.rs581 data_dir: String,COMMENT
LOWcmd/tikv-ctl/src/cmd.rs601 #[clap(long, default_value = "symlink")]COMMENT
LOWcmd/tikv-ctl/src/cmd.rs821 )]COMMENT
LOWtests/failpoints/mod.rs1// Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0.COMMENT
LOWtests/failpoints/cases/test_snap.rs1181 // k2 (split point)COMMENT
LOWtests/failpoints/cases/test_hibernate.rs361 rx.recv_timeout(Duration::from_secs(1)).unwrap(),COMMENT
LOWtests/failpoints/cases/test_conf_change.rs201 cluster.must_put(key, value);COMMENT
LOWtests/failpoints/cases/test_replica_read.rs341 router.send_raft_message(read_index_msg).unwrap();COMMENT
LOWtests/failpoints/cases/test_disk_snap_br.rs1// Copyright 2023 TiKV Project Authors. Licensed under Apache-2.0.COMMENT
LOWtests/failpoints/cases/test_engine.rs61// note: before rocksdb/pull/347, lock is called before on_memtable_sealed.COMMENT
LOWtests/failpoints/cases/test_split_region.rs581 // [k2, +∞) │ │ │ │ │ │COMMENT
LOWtests/failpoints/cases/test_split_region.rs1441 fail::remove("on_apply_batch_split");COMMENT
LOWtests/failpoints/cases/test_early_apply.rs101/// between restarting. However, this guarantee can be broken byCOMMENT
LOWtests/failpoints/cases/test_sst_ingest.rs21use test_raftstore::*;COMMENT
LOWtests/failpoints/cases/test_merge.rs961COMMENT
LOWtests/failpoints/cases/test_merge.rs1061 }COMMENT
LOWtests/failpoints/cases/test_stale_read.rs261 assert_ne!(leader1.get_store_id(), leader1000.get_store_id());COMMENT
LOWtests/failpoints/cases/test_stale_read.rs281 // Region 1000 F L FCOMMENT
LOWtests/integrations/raftstore/test_snap.rs281 must_get_equal(&cluster.get_engine(3), b"k11", b"v11");COMMENT
LOWtests/integrations/raftstore/test_stale_peer.rs21/// - Peer B gets down. And then A adds D, E, F into the cluster.COMMENT
LOWtests/integrations/raftstore/test_stale_peer.rs101 let mut cluster = new_server_cluster(0, count);COMMENT
LOWtests/integrations/raftstore/test_unsafe_recovery.rs1381 assert_eq!(cluster.must_get(b"k4"), Some(b"v4".to_vec()));COMMENT
LOWtests/integrations/raftstore/test_lease_read.rs21// A helper function for testing the lease reads and lease renewing.COMMENT
LOWtests/integrations/raftstore/test_lease_read.rs661/// 1. Add heartbeat msg filter.COMMENT
LOWtests/integrations/raftstore/test_bootstrap.rs281 let msg = PeerMsg::FlushBeforeClose { tx };COMMENT
LOWtests/integrations/storage/test_titan.rs301 // L5: [delete(a_7)]COMMENT
LOWtests/integrations/storage/test_storage.rs921COMMENT
LOWetc/config-template.toml1## TiKV config templateCOMMENT
LOWetc/config-template.toml21## Use abort when TiKV panic. By default TiKV will use _exit() on panic, in that caseCOMMENT
LOWetc/config-template.toml41## this threshold, it can squeeze some internal components (e.g. evicting cached Raft entries)COMMENT
LOWetc/config-template.toml61# background-read-bandwidth = "0B"COMMENT
LOWetc/config-template.toml81## max log file keep daysCOMMENT
LOWetc/config-template.toml101COMMENT
LOWetc/config-template.toml121## The following configurations only take effect when `use-unified-pool` is false.COMMENT
LOWetc/config-template.toml141## Size of the stack for each thread in the thread pool.COMMENT
LOWetc/config-template.toml161# max-tasks-per-worker-normal = 2000COMMENT
LOWetc/config-template.toml181## Listening address.COMMENT
LOWetc/config-template.toml201## Size of the thread pool for the gRPC server.COMMENT
LOWetc/config-template.toml221COMMENT
LOWetc/config-template.toml241## By default, it will be set to 12.5% of the available memory of TiKV.COMMENT
LOWetc/config-template.toml261## If handle time is larger than the threshold, it will print slow log in endpoint.COMMENT
LOWetc/config-template.toml281COMMENT
LOWetc/config-template.toml301COMMENT
LOWetc/config-template.toml321## It is recommended to turn on shared block cache. Since only the total cache size need to beCOMMENT
LOWetc/config-template.toml341## Support change dynamically.COMMENT
LOWetc/config-template.toml361## in one second. Internally it prefers throttling background operations over foregroundCOMMENT
LOWetc/config-template.toml381COMMENT
LOWetc/config-template.toml401## can improve TiKV performance.COMMENT
LOWetc/config-template.toml421## Store min resolved ts tick interval for reporting to PD.COMMENT
LOWetc/config-template.toml441# raft-log-gc-tick-interval = "3s"COMMENT
LOWetc/config-template.toml461## How long the peer will be considered down and reported to PD when it hasn't been active for thisCOMMENT
LOWetc/config-template.toml481# region-compact-min-redundant-rows = 50000COMMENT
LOWetc/config-template.toml501## Use how many threads to handle log applyCOMMENT
LOWetc/config-template.toml521# split-region-on-table = falseCOMMENT
718 more matches not shown…
Hallucination Indicators84 hits · 695 pts
SeverityFileLineSnippetContext
CRITICALcomponents/pd_client/src/client_v2.rs499 let env = self.raw_client.core.context.connector.env.clone();CODE
CRITICALcomponents/raftstore/src/store/fsm/store.rs1078 self.previous_append = self.poll_ctx.raft_metrics.ready.append.get();CODE
CRITICALcomponents/raftstore/src/store/fsm/store.rs1079 self.previous_message = self.poll_ctx.raft_metrics.ready.message.get();CODE
CRITICALcomponents/raftstore/src/store/fsm/store.rs1080 self.previous_snapshot = self.poll_ctx.raft_metrics.ready.snapshot.get();CODE
CRITICALcomponents/raftstore/src/store/fsm/store.rs2501 self.ctx.raft_metrics.message_dropped.stale_msg.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/store.rs2650 self.ctx.raft_metrics.message_dropped.region_overlap.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs755 self.ctx.raft_metrics.message_dropped.step_local_msg.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs922 self.ctx.raft_metrics.ready.propose_delay.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1009 target_index: self.fsm.peer.raft_group.raft.raft_log.last_index(),CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1050 target_index: self.fsm.peer.raft_group.raft.raft_log.last_index(),CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1104 self.fsm.peer.raft_group.raft.raft_log.last_index()CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1142 let target_index = self.fsm.peer.raft_group.raft.raft_log.last_index();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1266 let pending_admin = self.fsm.peer.raft_group.raft.has_pending_conf()CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1839 self.fsm.peer.raft_group.raft.election_timeout() * 2CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1845 } else if self.fsm.peer.raft_group.raft.promotable()CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1860 self.fsm.peer.raft_group.raft.randomized_election_timeout()CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1894 if self.fsm.peer.raft_group.raft.r.raft_log.last_index()CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs1981 self.fsm.peer.raft_group.raft.set_check_quorum(true);CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2023 self.fsm.peer.raft_group.raft.set_check_quorum(false);CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2071 self.fsm.peer.raft_group.raft.set_check_quorum(true);CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2073 if self.fsm.peer.raft_group.raft.promotable() {CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2153 for (id, vote) in self.fsm.peer.raft_group.raft.prs().votes() {CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2379 self.ctx.raft_metrics.ready.has_ready_region.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2794 self.ctx.raft_metrics.propose.unsafe_read_index.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2928 self.ctx.raft_metrics.message_dropped.disk_full.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs2939 self.ctx.raft_metrics.message_dropped.non_witness.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3051 self.ctx.raft_metrics.message_dropped.stale_msg.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3220 for (peer_id, p) in self.fsm.peer.raft_group.raft.prs().iter() {CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3299 self.fsm.peer.raft_group.raft.ping();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3507 self.ctx.raft_metrics.message_dropped.stale_msg.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3536 None => self.ctx.raft_metrics.message_dropped.applying_snap.inc(),CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3643 self.ctx.raft_metrics.message_dropped.stale_msg.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3754 self.ctx.raft_metrics.message_dropped.region_no_peer.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3784 self.ctx.raft_metrics.message_dropped.stale_msg.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3819 self.ctx.raft_metrics.message_dropped.region_overlap.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs3882 self.ctx.raft_metrics.message_dropped.region_overlap.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs4163 None => self.ctx.raft_metrics.message_dropped.applying_snap.inc(),CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs4529 if cp.index >= self.fsm.peer.raft_group.raft.raft_log.first_index() {CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs4738 let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs5517 let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs5640 self.fsm.peer.raft_group.raft.clear_commit_group();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs5641 self.fsm.peer.raft_group.raft.assign_commit_groups(gb);CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs5816 let first_index = self.fsm.peer.raft_group.raft.r.raft_log.first_index();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs5992 self.ctx.raft_metrics.invalid_proposal.force_leader.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6022 self.ctx.raft_metrics.invalid_proposal.not_leader.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6034 self.ctx.raft_metrics.invalid_proposal.witness.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6051 self.ctx.raft_metrics.invalid_proposal.witness.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6058 self.ctx.raft_metrics.invalid_proposal.non_witness.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6087 self.ctx.raft_metrics.invalid_proposal.stale_command.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6099 self.ctx.raft_metrics.invalid_proposal.epoch_not_match.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6348 for (peer_id, p) in self.fsm.peer.raft_group.raft.prs().iter() {CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6412 self.ctx.raft_metrics.raft_log_gc_skipped.reserve_log.inc();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs6518 self.fsm.peer.request_index = self.fsm.peer.raft_group.raft.raft_log.last_index();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs7199 let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs7210 let transferring_leader = self.fsm.peer.raft_group.raft.lead_transferee.is_some();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs7469 let mut pessimistic_locks = self.fsm.peer.txn_ext.pessimistic_locks.write();CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs7557 if self.fsm.peer.consistency_state.hash.is_empty() {CODE
CRITICALcomponents/raftstore/src/store/fsm/peer.rs7585 && !self.fsm.peer.consistency_state.hash.is_empty()CODE
CRITICALcomponents/raftstore-v2/src/operation/query/mod.rs91 self.store_ctx.raft_metrics.propose.local_read.inc();CODE
CRITICALcomponents/server/src/server2.rs546 self.core.config.resource_metering.precision.as_millis(),CODE
24 more matches not shown…
AI Slop Vocabulary14 hits · 40 pts
SeverityFileLineSnippetContext
MEDIUMetc/config-template.toml17## Enable io snoop which utilize eBPF to get accurate disk io of TiKVCOMMENT
MEDIUM…mponents/raftstore/src/coprocessor/split_check/keys.rs164 // if bucket checker using scan is added, to utilize the scan,COMMENT
MEDIUMcomponents/raftstore/src/store/config.rs343 /// from entry cache, if they utilize memory more thanCOMMENT
MEDIUMcomponents/raftstore/src/store/fsm/peer.rs4614 // to utilize `collect_pending_peers` in `heartbeat_pd` to avoidCOMMENT
MEDIUMcomponents/snap_recovery/src/data_resolver.rs191// batch) a more robust test need to figure out what is best.COMMENT
MEDIUMcomponents/resolved_ts/src/resolver.rs97 // The region read progress used to utilize `resolved_ts` to serve stale read requestCOMMENT
MEDIUMcomponents/causal_ts/src/tso.rs136/// 2. Fully utilize cached TSO when some regions require latest TSO (e.g. inCOMMENT
MEDIUMcomponents/tidb_query_aggr/src/lib.rs85 // However current aggregation executor cannot utilize it.COMMENT
MEDIUMscripts/check-bins.py4# utilize sse4.2 extensions.COMMENT
MEDIUMsrc/server/config.rs243 /// or dropped, if they utilize memory more thanCOMMENT
MEDIUMsrc/server/gc_worker/compaction_filter.rs825 // won't utilize much CPU. So always perform GC at the bottommost levelCOMMENT
MEDIUMsrc/storage/txn/actions/common.rs39 // Note that the scan can also utilize `last_change`. So once it finds a LOCKCOMMENT
MEDIUMsrc/storage/mvcc/reader/scanner/backward.rs303 // we don't need to seek any more and we can just utilize `last_version`.COMMENT
MEDIUMsrc/storage/raw/store.rs24// TODO: refactor to utilize generic type `KvFormat` and eliminate matchingCOMMENT
Decorative Section Separators7 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMtests/failpoints/cases/test_snap.rs1184 // ───────────────────┼──────────────────COMMENT
MEDIUMtests/failpoints/cases/test_split_region.rs578 // ┌───────────┐ ┌───────────┐ ┌───────────┐COMMENT
MEDIUMtests/failpoints/cases/test_split_region.rs582 // ───────────────────┼───────────┼──┼───────────┼──┼───────────┼──COMMENT
MEDIUMtests/failpoints/cases/test_split_region.rs586 // └───────────┘ └───────────┘ └───────────┘COMMENT
MEDIUMcomponents/backup-stream/src/metrics.rs20 // ┌─────────┐ ┌────────┐ ┌───────┐COMMENT
MEDIUMcomponents/backup-stream/src/metrics.rs21 // │ RUNNING ├──────► PAUSED ├──────► ERROR │COMMENT
MEDIUMcomponents/backup-stream/src/metrics.rs23 // └───────────────┴───────────────┘COMMENT
Verbosity Indicators11 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/failpoints/cases/test_storage.rs2444 // Step 1: T1 acquires an exclusive lock.COMMENT
LOWtests/failpoints/cases/test_storage.rs2447 // Step 2: T2 (legacy) tries to acquire an exclusive lock, gets blocked.COMMENT
LOWtests/failpoints/cases/test_storage.rs2469 // Step 3: T3 (resumable) tries to acquire an exclusive lock, gets blocked.COMMENT
LOWtests/failpoints/cases/test_storage.rs2473 // Step 4: Release T1's exclusive lock.COMMENT
LOWtests/failpoints/cases/test_storage.rs2478 // Step 5: T4 acquires a shared lock before T3 resumes.COMMENT
LOWtests/failpoints/cases/test_storage.rs2482 // Step 6: Remove the pause to allow delayed wake up, T3 will be woken upCOMMENT
LOWtests/failpoints/cases/test_storage.rs2487 // Step 7: Now T3's AcquirePessimisticLockResumed is about to execute.COMMENT
LOWtests/integrations/server/raft_client.rs456 // Step 1: Send messages to establish connections for stores 1, 2, 3COMMENT
LOWtests/integrations/server/raft_client.rs481 // Step 2: Add more stores (4, 5) to test dynamic store detectionCOMMENT
LOWsrc/storage/mvcc/reader/scanner/forward.rs233 // In SI, we need to check if the lock will cause conflict.COMMENT
LOWsrc/storage/mvcc/reader/scanner/forward.rs251 // key that does not have a write. In SI, we need to check if theCOMMENT
Structural Annotation Overuse11 hits · 21 pts
SeverityFileLineSnippetContext
LOWtests/failpoints/cases/test_storage.rs2444 // Step 1: T1 acquires an exclusive lock.COMMENT
LOWtests/failpoints/cases/test_storage.rs2447 // Step 2: T2 (legacy) tries to acquire an exclusive lock, gets blocked.COMMENT
LOWtests/failpoints/cases/test_storage.rs2469 // Step 3: T3 (resumable) tries to acquire an exclusive lock, gets blocked.COMMENT
LOWtests/failpoints/cases/test_storage.rs2473 // Step 4: Release T1's exclusive lock.COMMENT
LOWtests/failpoints/cases/test_storage.rs2478 // Step 5: T4 acquires a shared lock before T3 resumes.COMMENT
LOWtests/failpoints/cases/test_storage.rs2482 // Step 6: Remove the pause to allow delayed wake up, T3 will be woken upCOMMENT
LOWtests/failpoints/cases/test_storage.rs2487 // Step 7: Now T3's AcquirePessimisticLockResumed is about to execute.COMMENT
LOWtests/integrations/server/raft_client.rs456 // Step 1: Send messages to establish connections for stores 1, 2, 3COMMENT
LOWtests/integrations/server/raft_client.rs481 // Step 2: Add more stores (4, 5) to test dynamic store detectionCOMMENT
LOWcomponents/raftstore/src/store/fsm/peer.rs3965 // NOTE: This method is used by both the leader and the follower.COMMENT
LOW…onents/tidb_query_datatype/src/codec/mysql/time/mod.rs546 /// NOTE: This function assumes that `fsp` is in range: [0, 6].COMMENT
TODO Padding10 hits · 15 pts
SeverityFileLineSnippetContext
LOWcomponents/raftstore-v2/src/worker/pd/split.rs169 // TODO: implement half splitCOMMENT
LOWcomponents/tidb_query_datatype/src/codec/datum.rs1027 // TODO: implement datum write here.COMMENT
LOWcomponents/tidb_query_datatype/src/codec/datum.rs1074 // TODO: implement here after we implement datum writeCOMMENT
LOW…ents/tidb_query_datatype/src/codec/data_type/vector.rs283 // TODO: implement here after we implement set encodingCOMMENT
LOW…ents/tidb_query_datatype/src/codec/data_type/vector.rs356 // TODO: implement here after we implement set encodingCOMMENT
LOW…ents/tidb_query_datatype/src/codec/data_type/vector.rs473 // TODO: implement set encodingCOMMENT
LOWsrc/server/gc_worker/compaction_filter.rs84 //TODO: Add test case to check the correctness of GC_COMPACTION_FAILURECOMMENT
LOWsrc/server/gc_worker/compaction_filter.rs107 //TODO: Add test case to check the correctness of GC_COMPACTION_MVCC_ROLLBACKCOMMENT
LOWsrc/server/gc_worker/compaction_filter.rs115 //TODO: Add test case to check the correctness of GC_COMPACTION_FILTER_ORPHAN_VERSIONSCOMMENT
LOWsrc/server/gc_worker/compaction_filter.rs139 //TODO: Add test case to check the correctness of GC_COMPACTION_FILTER_MVCC_DELETION_WASTEDCOMMENT
Cross-Language Confusion2 hits · 12 pts
SeverityFileLineSnippetContext
HIGHmetrics/grafana/common.py1016 # Fix grafana heatmap migration panic if options is null.COMMENT
HIGHmetrics/grafana/common.py1195 "matcher": {"id": "byName", "options": "Last (not null)"},CODE
Hyper-Verbose Identifiers7 hits · 8 pts
SeverityFileLineSnippetContext
LOWmetrics/grafana/common.py162 def skip_default_instance_selector(self) -> "Expr":CODE
LOWmetrics/grafana/common.py1050def graph_panel_histogram_quantiles(CODE
LOWmetrics/grafana/common.py1146def heatmap_panel_graph_panel_histogram_quantile_pairs(CODE
LOWscripts/check-build-opts.py67def cargo_check_test_engines_ext(kv_engine, raft_engine):CODE
LOWscripts/check-build-opts.py70def cargo_test_test_engines_ext(kv_engine, raft_engine):CODE
LOWscripts/check-build-opts.py73def cargo_run_test_engines_ext(cmd, extra_args, kv_engine, raft_engine):CODE
LOWscripts/check-bins.py95def is_openssl_vendored_enabled(features):CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…tstore-v2/src/operation/command/admin/merge/prepare.rs228 /// - Target region epoch as requested is identical with the local version.COMMENT
Slop Phrases2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMetc/config-template.toml278## In most cases you can use the default value. When importing data, you can set it to a largerCOMMENT
MEDIUMcomponents/raftstore/src/store/config.rs641 // the log commit duration is less than 1s. Feel free to adjustCOMMENT
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWmetrics/grafana/common.py757CODE
LOWmetrics/grafana/common.py815CODE
LOWmetrics/grafana/common.py847CODE
LOWmetrics/grafana/common.py901CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWetc/config-template.toml299## Set it to 0 will cause no space is reserved at all. It's generally used for tests.COMMENT
LOWetc/config-template.toml305## Set it to 0 will cause no space is reserved at all. It's generally used for tests.COMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdoc/maintenance-guides/components/server.md11### Bootstrap orchestration viewCOMMENT
Unused Imports1 hit · 1 pts
SeverityFileLineSnippetContext
LOWmetrics/grafana/common.py1CODE
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWscripts/check-bins.py27CODE
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/storage/txn/actions/cleanup.rs219 must_prewrite_put(engine, key, b"dummy_value", key, gc_fence.prev());CODE