Repository Analysis

pingcap/tidb

TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling.

3.2 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pingcap/tidb, a Go project with 40,292 GitHub stars. SynthScan v2.0 examined 1,924,192 lines of code across 5654 source files, recording 5370 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 3.2 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).

3.2
Adjusted Score
3.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
40.3K
Stars
Go
Language
1.9M
Lines of Code
5.7K
Files
5.4K
Pattern Hits
2026-07-14
Scan Date
0.01
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 32HIGH 16MEDIUM 143LOW 5179

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 5370 distinct pattern matches across 15 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 Block5038 hits · 5020 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml1# Copyright 2023 PingCAP, Inc.COMMENT
LOWcmd/benchraw/main.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/pluginpkg/pluginpkg.go1// Copyright 2018 PingCAP, Inc.COMMENT
LOWcmd/importer/config.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/importer/db.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/importer/db_test.go1// Copyright 2018 PingCAP, Inc.COMMENT
LOWcmd/importer/job.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/importer/stats.go1// Copyright 2018 PingCAP, Inc.COMMENT
LOWcmd/importer/parser.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/importer/rand.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/importer/config.toml1# Copyright 2021 PingCAP, Inc.COMMENT
LOWcmd/importer/data.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/importer/main.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/benchkv/main.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/tidb-server/fips.go1// Copyright 2023 PingCAP, Inc.COMMENT
LOWcmd/tidb-server/main.go1// Copyright 2015 PingCAP, Inc.COMMENT
LOWcmd/tidb-server/main_test.go1// Copyright 2019 PingCAP, Inc.COMMENT
LOWcmd/ddltest/index_test.go1// Copyright 2015 PingCAP, Inc.COMMENT
LOWcmd/ddltest/random_test.go1// Copyright 2015 PingCAP, Inc.COMMENT
LOWcmd/ddltest/column_test.go1// Copyright 2015 PingCAP, Inc.COMMENT
LOWcmd/ddltest/ddl_test.go1// Copyright 2015 PingCAP, Inc.COMMENT
LOWcmd/ddltest/main_test.go1// Copyright 2021 PingCAP, Inc.COMMENT
LOWcmd/benchdb/main.go1// Copyright 2016 PingCAP, Inc.COMMENT
LOWcmd/mirror/mirror.go1// Copyright 2022 PingCAP, Inc.COMMENT
LOWlightning/tidb-lightning.toml1### tidb-lightning configuartionCOMMENT
LOWlightning/tidb-lightning.toml21index-concurrency = 2COMMENT
LOWlightning/tidb-lightning.toml41# Non-fatal errors are those that are localized to a few rows, and ignoring those rows allow the import process to contiCOMMENT
LOWlightning/tidb-lightning.toml61# ca-path = "/path/to/ca.pem"COMMENT
LOWlightning/tidb-lightning.toml81# For "file" driver, the DSN is a path. If not specified, Lightning would default to "/tmp/CHKPTSCHEMA.pb".COMMENT
LOWlightning/tidb-lightning.toml101strategy = ""COMMENT
LOWlightning/tidb-lightning.toml121# - none: does not detect duplicate records.COMMENT
LOWlightning/tidb-lightning.toml141# This setting is ignored in "tidb" and "importer" backends.COMMENT
LOWlightning/tidb-lightning.toml161# Because of implementation details of Lightning, the value is capped at 96 KiB and larger values are ignored.COMMENT
LOWlightning/tidb-lightning.toml181# Lightning will slightly increase the size of the first few batches to properly distributeCOMMENT
LOWlightning/tidb-lightning.toml201# Specifies the character set of the source data file. Lightning converts the source file from the specified character sCOMMENT
LOWlightning/tidb-lightning.toml221COMMENT
LOWlightning/tidb-lightning.toml241COMMENT
LOWlightning/tidb-lightning.toml261# whether to interpret backslash-escape inside strings.COMMENT
LOWlightning/tidb-lightning.toml301COMMENT
LOWlightning/tidb-lightning.toml321# public certificate of the CA. Set to empty string to disable TLS.COMMENT
LOWlightning/cmd/tidb-lightning/fips.go1// Copyright 2023 PingCAP, Inc.COMMENT
LOWlightning/cmd/tidb-lightning/main.go1// Copyright 2019 PingCAP, Inc.COMMENT
LOWlightning/cmd/tidb-lightning/main.go61COMMENT
LOWlightning/cmd/tidb-lightning/main_test.go1// Copyright 2019 PingCAP, Inc.COMMENT
LOWlightning/cmd/tidb-lightning-ctl/fips.go1// Copyright 2023 PingCAP, Inc.COMMENT
LOWlightning/cmd/tidb-lightning-ctl/main.go1// Copyright 2019 PingCAP, Inc.COMMENT
LOWlightning/cmd/tidb-lightning-ctl/main_test.go1// Copyright 2019 PingCAP, Inc.COMMENT
LOWlightning/tests/run_group_lightning_tests.sh1#!/usr/bin/env bashCOMMENT
LOWlightning/tests/run_local_sst_test.sh1#!/bin/bashCOMMENT
LOWlightning/tests/run.sh1#!/bin/bashCOMMENT
LOWlightning/tests/download_integration_test_binaries.sh1#! /usr/bin/env bashCOMMENT
LOWlightning/tests/lightning_ignore_columns/run.sh1#!/bin/bashCOMMENT
LOWlightning/tests/lightning_gcs/run.sh1#!/bin/bashCOMMENT
LOWlightning/tests/lightning_tikv_multi_rocksdb/run.sh1#!/bin/shCOMMENT
LOWlightning/tests/lightning_import_compress/run.sh1#!/bin/bashCOMMENT
LOW…lace_one_key_multiple_conflicts_nonclustered_pk/run.sh1#!/bin/bashCOMMENT
LOW…_resolution_replace_one_unique_key_clustered_pk/run.sh1#!/bin/bashCOMMENT
LOW…htning/tests/lightning_checkpoint_dirty_tableid/run.sh1#!/bin/shCOMMENT
LOWlightning/tests/lightning_config_max_error/run.sh1#!/bin/shCOMMENT
LOWlightning/tests/lightning_s3/run.sh1#!/bin/bashCOMMENT
4978 more matches not shown…
Decorative Section Separators102 hits · 378 pts
SeverityFileLineSnippetContext
MEDIUMpkg/statistics/handle/globalstats/global_stats_async.go64// ┌────────────────────────┐ ┌───────────────────────┐COMMENT
MEDIUMpkg/statistics/handle/globalstats/global_stats_async.go73// └────────────────────────┘ └───────────────────────┘COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go86// ┌─────────────────────────────────────────────────────────────────────────────────────┐COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go88// └─────────────────────────────────────────────────────────────────────────────────────┘COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go91// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go115// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go117// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go127// ─────────────────── ────────────── ────────────COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go140// ├──Initialize(ctx) ──────────────────────────────────────> run() startsCOMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go146// ├──Pop() ──────────────────┐ ├──ProcessDMLChanges()COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go152// ├──SubmitJob(job) ─────────┘ ├──RequeueMustRetryJobs()COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go163// ├──ClosePriorityQueue() ──────────────────────────────────────> ctx.Done()COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go167// │ ├──Wait() ◄─────────────────────────────────────────────┤COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go173// │ │ ◄─────────────────────────────────────────────────────┘COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go178// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go180// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go185// ─────────────────────────── ───────────── ────────────COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go188// ├──Lock() ──────────────────> [LOCKED] ◄───────────────── ProcessDMLChanges()COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go191// ├──cancel context ─────────────────┼──────────────────────> (will see ctx.Done())COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go193// ├──Unlock() ────────────────> [UNLOCKED] │COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go195// │ │ ◄────────────────────────────┤COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go204// ├──Wait() ◄───────────────────────────────────────────────────────┤COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go221// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go223// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go226// ─────────────────── ────────────── ─────────── ────────────COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go233// SubmitJob(T1) ──────────────────────────────────────────────────────────────> [Start analyzing T1]COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go275// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go277// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go280// ─────────────────── ────────────── ────────────COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go284// └──return job ──────────────────────────────────────> [Start analyzing T1]COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go339// ─────────────────── ───────────────── ────────────────────COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go349// │ │ ┌──────────────┐COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go358// │ │ └──────────────┘COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go361// │ ├──spawn run() ──────────────────────────────> Queue Worker runningCOMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go301// │ │ ├──runningJobs = nil ◄──────────────────────┼──────┐COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go325// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go327// ═══════════════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUM…g/statistics/handle/autoanalyze/priorityqueue/queue.go372// ├──ClosePriorityQueue() ──────────────────────────> Queue closedCOMMENT
MEDIUMpkg/planner/cascades/memo/memo.go96// lp ┌──────────┐COMMENT
MEDIUMpkg/planner/cascades/memo/memo.go101// └──────────┘COMMENT
MEDIUMpkg/planner/cascades/memo/memo.go105// lp ┌──────────┐COMMENT
MEDIUMpkg/planner/cascades/memo/memo.go110// └──────────┘COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go102// ┌────────────────────┼───────┼──┐ ┌──────────────────────┐COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go105// │ ┌───────┐ ┌───────┐ │ │ ┌───────┐ ┌───────┐ │COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go117// └───────────────────────────────┘ └──────────────────────┘COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go219// ┌─────────────rootG──┼───────┼──┐ ┌─────────rootG────────┐ ┌───────rootG───────┐COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go222// │ ┌───────┐ ┌───────┐ │ │ ┌───────┐ ┌───────┐ │ │ ┌───────┐ │COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go226// │Memo │ │ ├──G-merge1─►│Memo └────┼────┘ │──G-merge2─► │ ┌──────▼──────┐ │COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go227// │ ┌───▼───┐ ┌───▼───┐ │ │ ┌──────▼──────┐ │ │ │ 5:dst │ │COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go229// │ │ sort1 │ │ sort1 │ │ │ │ sort1 sort2 │ │ │ └───┼─────┼───┘ │COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go230// │ │ │ │ │ │ │ └───┼─────┼───┘ │ │ │ │ │COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go235// │ └───────┼─────────┘ │ │ └──┼──┘ │ │ childG │COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go236// │ childG │ │ childG │ └───────────────────┘COMMENT
MEDIUMpkg/planner/cascades/memo/memo_test.go237// └───────────────────────────────┘ └──────────────────────┘COMMENT
MEDIUMpkg/planner/cascades/task/task_apply_rule.go43// ┌───┼────┼────┼────┼────────────────────────────────────────COMMENT
MEDIUMpkg/planner/cascades/task/task_apply_rule.go47// └──────────────────┼────┼────┼────┼─────────────────────────COMMENT
MEDIUMpkg/planner/cascades/task/task_apply_rule.go70// ┌────────────────┐ ┌────────────▼───────────┐ ┌───────┴───────┐COMMENT
MEDIUMpkg/planner/cascades/task/task_apply_rule.go71// │ optGroupTask │ ───────► │ optGroupExpressionTask │ ───────► │ ApplyRuleTask │COMMENT
MEDIUMpkg/planner/cascades/task/task_apply_rule.go72// └──────▲─────────┘ └────────────┬───────────┘ └───────────────┘COMMENT
MEDIUMpkg/planner/cascades/task/task_apply_rule.go74// └───── Child Opt Group Trigger ─────┘COMMENT
42 more matches not shown…
Hallucination Indicators32 hits · 370 pts
SeverityFileLineSnippetContext
CRITICALlightning/pkg/importer/dup_detect.go227 igCols, err := d.rc.cfg.Mydumper.IgnoreColumns.GetIgnoreColumns(d.tr.dbInfo.Name, tblInfo.Name.O, cfg.Mydumper.CaseSensCODE
CRITICALpkg/util/memory/tracker_test.go722 require.True(t, t1.MemArbitrator.bigBudgetCap() == t1.MemArbitrator.budget.mu.bigB.Pool.capacity())CODE
CRITICALpkg/util/memory/tracker_test.go1020 return m.heapController.memRisk.startTime.t.Add(time.Second)CODE
CRITICALpkg/util/memory/arbitrator_test.go1921 require.True(t, m.heapController.memRisk.startTime.t.IsZero())CODE
CRITICALpkg/util/memory/arbitrator_test.go1922 require.True(t, m.heapController.memRisk.lastMemStats.startTime.IsZero())CODE
CRITICALpkg/util/memory/arbitrator_test.go1946 require.True(t, m.heapController.memRisk.startTime.t.Equal(startTime))CODE
CRITICALpkg/util/memory/arbitrator_test.go1947 require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(startTime))CODE
CRITICALpkg/util/memory/arbitrator_test.go1979 debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration - 1)CODE
CRITICALpkg/util/memory/arbitrator_test.go1982 require.True(t, m.heapController.memRisk.startTime.t.Equal(startTime))CODE
CRITICALpkg/util/memory/arbitrator_test.go1983 require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(startTime))CODE
CRITICALpkg/util/memory/arbitrator_test.go2011 debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration)CODE
CRITICALpkg/util/memory/arbitrator_test.go2015 require.True(t, m.heapController.memRisk.startTime.t.Equal(startTime))CODE
CRITICALpkg/util/memory/arbitrator_test.go2016 require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(debugTime)) // update last mem statsCODE
CRITICALpkg/util/memory/arbitrator_test.go2032 debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration)CODE
CRITICALpkg/util/memory/arbitrator_test.go2037 require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(debugTime))CODE
CRITICALpkg/util/memory/arbitrator_test.go2076 debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration * 1)CODE
CRITICALpkg/util/memory/arbitrator_test.go2081 require.True(t, m.heapController.memRisk.lastMemStats.startTime.Equal(debugTime))CODE
CRITICALpkg/util/memory/arbitrator_test.go2101 debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration * 1)CODE
CRITICALpkg/util/memory/arbitrator_test.go2128 debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defKillCancelCheckTimeout)CODE
CRITICALpkg/util/memory/arbitrator_test.go2147 debugTime = m.heapController.memRisk.lastMemStats.startTime.Add(defHeapReclaimCheckDuration)CODE
CRITICALpkg/util/memory/arbitrator_test.go2231 m.heapController.memRisk.startTime.unixMilli.Store(time.Now().UnixMilli())CODE
CRITICALpkg/util/memory/arbitrator_test.go2233 m.heapController.memRisk.startTime.unixMilli.Store(0)CODE
CRITICALpkg/util/memory/arbitrator.go2594 if t := m.heapController.memRisk.startTime.unixMilli.Load(); t != 0 {CODE
CRITICALpkg/util/memory/arbitrator.go2810 m.heapController.memRisk.startTime.unixMilli.Store(m.heapController.memRisk.startTime.t.UnixMilli())CODE
CRITICALpkg/util/memory/arbitrator.go3207 return m.heapController.memRisk.startTime.unixMilli.Load() != 0CODE
CRITICALpkg/util/memory/arbitrator.go3228 m.heapController.memRisk.startTime.unixMilli.Store(now.UnixMilli())CODE
CRITICALpkg/util/memory/arbitrator.go3270 m.heapController.memRisk.startTime.unixMilli.Store(0)CODE
CRITICALpkg/util/chunk/row_container.go159 c.m.records.inDisk.diskTracker.AttachTo(c.diskTracker)CODE
CRITICALpkg/util/execdetails/runtime_stats.go855 buf.WriteString(strconv.FormatFloat(e.Commit.Mu.SlowestPrewrite.ReqTotalTime.Seconds(), 'f', 3, 64))CODE
CRITICALpkg/util/execdetails/runtime_stats.go861 buf.WriteString(e.Commit.Mu.SlowestPrewrite.ExecDetails.String())CODE
CRITICALpkg/util/execdetails/runtime_stats.go866 buf.WriteString(strconv.FormatFloat(e.Commit.Mu.CommitPrimary.ReqTotalTime.Seconds(), 'f', 3, 64))CODE
CRITICALpkg/util/execdetails/runtime_stats.go872 buf.WriteString(e.Commit.Mu.CommitPrimary.ExecDetails.String())CODE
Verbosity Indicators54 hits · 102 pts
SeverityFileLineSnippetContext
LOWbr/tests/br_pitr_table_filter/run.sh1114 # Step 1: Get the Base64 encoded storage URLCOMMENT
LOWbr/pkg/restore/log_client/client.go2456 // Step 1: Process DELETIONS in dependency-safe order (tables first, then databases)COMMENT
LOWbr/pkg/restore/log_client/client.go2521 // Step 2: Process ADD/UPDATE operations in dependency-safe order (databases first, then tables)COMMENT
LOWpkg/statistics/histogram.go1116 // Step 1: Calculate a default of "one value"COMMENT
LOWpkg/statistics/histogram.go1121 // Step 2: If modifications are not allowed, return the one value.COMMENT
LOWpkg/statistics/histogram.go1129 // Step 3: Adjust oneValue if the NDV is lowCOMMENT
LOWpkg/statistics/histogram.go1136 // Step 4: Calculate how much of the statistics share a common prefix.COMMENT
LOWpkg/statistics/histogram.go1206 // Step 8: Calculate the out of range percentagesCOMMENT
LOWpkg/statistics/histogram.go1215 // Step 9: Calculate the added rowsCOMMENT
LOWpkg/statistics/histogram.go1222 // Step 10: Calculate the estimated rowsCOMMENT
LOWpkg/statistics/histogram.go1150 // Step 5:Convert the range we want to estimate to scalar value(float64)COMMENT
LOWpkg/statistics/histogram.go1175 // Step 6: Convert the lower and upper bound of the histogram to scalar value(float64)COMMENT
LOWpkg/statistics/histogram.go1190 // Step 7: Calculate the width of the predicateCOMMENT
LOWpkg/statistics/histogram.go1241 // Step 11: Calculate a potential worst case for use in final MaxEstCOMMENT
LOWpkg/statistics/histogram.go1259 // Step 12: Calculate the final min/max/est rows including the skew ratio adjustmentCOMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go50 // Step 1: Insert a pending job using the StatsHandle API.COMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go59 // Step 2: Start the job.COMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go66 // Step 3: Mark the job as failed.COMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go69 // Step 4: Query via the stats session pool.COMMENT
LOWpkg/util/sqlexec/restricted_sql_executor.go34// For example when executing create user statement, we need to check if the user alreadyCOMMENT
LOWpkg/util/extsort/disk_sorter.go525 // So we need to check if the next file needs to be opened.COMMENT
LOWpkg/util/topsql/reporter/ru_window_aggregator.go144 // Step 1: take buckets under lock.COMMENT
LOWpkg/util/topsql/reporter/ru_window_aggregator.go150 // Step 2: build report records outside lock.COMMENT
LOWpkg/planner/core/rule_join_reorder_projection_inline.go79 // that has been substituted to the underlying expression), we need to check if the outputCOMMENT
LOWpkg/planner/core/joinorder/util.go373 // Step 1: Direct match by table nameCOMMENT
LOWpkg/planner/core/joinorder/util.go401 // Step 2: Match by query-block alias (subquery name)COMMENT
LOWpkg/ddl/executor.go577 // Alter `tiflashCheckPendingTablesLimit` tables are handled, we need to check if we have reached threshold.COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3047 // Step 1: begin(when i = 0).COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3052 // Step 2: prepare stmts.COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3063 // Step 3: begin.COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3077 // Step 4: exec stmts in write-only state (dropping a colum).COMMENT
LOWpkg/executor/write.go160 // Step 1: non-generated columns (These columns should be evaluated outside this function).COMMENT
LOWpkg/executor/write.go161 // Step 2: check whether there are some columns changed.COMMENT
LOWpkg/executor/write.go162 // Step 3: on-update-now columns if non-generated columns are changed.COMMENT
LOWpkg/executor/write.go163 // Step 4: generated columns if non-generated columns are changed.COMMENT
LOWpkg/executor/write.go164 // Step 5: handle foreign key errors, bad null errors and exchange partition errors.COMMENT
LOWpkg/executor/write.go167 // Step 2: compare already evaluated columns and update changed, handleChanged and handleChanged flags.COMMENT
LOWpkg/executor/write.go189 // Step 3: fill values into on-update-now fields.COMMENT
LOWpkg/executor/write.go213 // Step 4: fill auto generated columnsCOMMENT
LOWpkg/executor/write.go249 // Step 5: handle foreign key errors, bad null errors and exchange partition errors.COMMENT
LOWpkg/executor/show_affinity_test.go196 // Step 1: Create table firstCOMMENT
LOWpkg/executor/show_affinity_test.go200 // Step 2: Get actual table ID from sessionCOMMENT
LOWpkg/executor/show_affinity_test.go206 // Step 3: Set up mock PD clientCOMMENT
LOWpkg/executor/show_affinity_test.go211 // Step 4: Mock the GetAllAffinityGroups call with actual group IDCOMMENT
LOWpkg/executor/show_affinity_test.go226 // Step 5: Execute query and verify resultsCOMMENT
LOWpkg/executor/show_affinity_test.go258 // Step 1: Create table firstCOMMENT
LOWpkg/executor/show_affinity_test.go262 // Step 2: Set up mock PD clientCOMMENT
LOWpkg/executor/show_affinity_test.go267 // Step 3: Mock PD response with empty map (group not found)COMMENT
LOWpkg/executor/show_affinity_test.go272 // Step 4: Test that all PD-related fields show as native NULL when group not found in PDCOMMENT
LOWpkg/expression/builtin_string.go175// We need to check if the tp is enum or set, if so, don't add binary flag directly unless it has binary flag.COMMENT
LOWpkg/expression/builtin_miscellaneous.go1245 // We need to check if the string has leading/trailing spaces before parsingCOMMENT
LOWpkg/expression/builtin_miscellaneous.go1852 // We need to check if the string has leading/trailing spaces before parsingCOMMENT
LOWpkg/expression/builtin_miscellaneous_vec.go181 // We need to check if the string has leading/trailing spaces before parsingCOMMENT
LOWpkg/expression/builtin_miscellaneous_vec.go838 // We need to check if the string has leading/trailing spaces before parsingCOMMENT
AI Slop Vocabulary34 hits · 99 pts
SeverityFileLineSnippetContext
MEDIUM…one_key_multiple_conflicts_nonclustered_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…lution_replace_one_unique_key_clustered_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…_replace_multiple_unique_keys_clustered_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…tests/lightning_duplicate_resolution_error/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…tion_replace_multiple_keys_nonclustered_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…tning_duplicate_resolution_replace_one_key/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…ion_error_uk_multiple_files_multicol_index/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…olution_replace_multiple_keys_clustered_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…plicate_resolution_error_pk_multiple_files/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…place_multiple_unique_keys_nonclustered_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…ce_one_key_multiple_conflicts_clustered_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…ace_one_unique_key_nonclustered_varchar_pk/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUM…plicate_resolution_error_uk_multiple_files/config.toml16# ensure each file is its own engine to facilitate cross-engine detection.COMMENT
MEDIUMlightning/pkg/importer/chunk_process.go711 // but we met it one time, but cannot reproduce it now, we add this check to make code more robustCOMMENT
MEDIUMbr/tests/br_pitr_table_filter/sqls/check.sh765# ActionDropForeignKey comprehensive testCOMMENT
MEDIUMpkg/statistics/handle/storage/read_test.go128 // Use >= 3 to make the test more robust. But it should be exactly 3.COMMENT
MEDIUMpkg/util/topsql/reporter/pubsub_test.go384 // Eventually checks make this test robust to async subscribe goroutines.COMMENT
MEDIUMpkg/config/kerneltype/doc.go28// However, unlike the next-generation (cloud native) kernel, it does not leverageCOMMENT
MEDIUMpkg/planner/core/index_join_path.go770 // reason1: we need to leverage original indexPathInfo down related logic to build constant range for index plan.COMMENT
MEDIUMpkg/planner/core/stats.go124 // 2: EliminateNoPrecisionCast here can convert query 'cast(c<int> as bigint) = 1' to 'c = 1' to leverage access range.COMMENT
MEDIUMpkg/planner/core/exhaust_physical_plans.go745 // if there is no chosen info, it means the leaf datasource couldn't even leverage this indexJoinProp, return InvalidTCOMMENT
MEDIUMpkg/planner/core/find_best_task.go801 // if both lhs and rhs need to access table after IndexScan, we utilize the set of columns that occurred in AccessCondCOMMENT
MEDIUMpkg/planner/core/plan_cost_ver2.go1192// For simplicity and robust, only operators that need double-read like IndexLookup and IndexJoin consider this cost.COMMENT
MEDIUMpkg/planner/core/joinorder/join_order.go164 // Since edges without equi-conditions perform poorly (as the executor cannot utilize Hash Join),COMMENT
MEDIUMpkg/planner/core/rule/rule_predicate_simplification.go211 // Thus, we utilize a switch to govern this particular logic.COMMENT
MEDIUM…/planner/core/operator/logicalop/logical_plans_misc.go186 // 1. Those tables are small enough, push to cop can't utilize several TiKV to accelerate computation.COMMENT
MEDIUM…/planner/core/operator/logicalop/logical_plans_misc.go245 // 1. Those tables are small enough, push to cop can't utilize several TiKV to accelerate computation.COMMENT
MEDIUMpkg/planner/funcdep/fd_graph.go1036 // leverage the information collected in the loop1 above and try to do some FD substitution.COMMENT
MEDIUMpkg/planner/property/physical_property.go475// "Equivalence" refers to the process where we utilize a hash column to obtain equivalent columns,COMMENT
MEDIUMpkg/ddl/backfilling.go118// system variable "tidb_ddl_reorg_worker_cnt". Essentially, reorg job is mainly basedCOMMENT
MEDIUMpkg/ddl/backfilling_test.go307 // Some fields should be different from the default context to make the test robust.COMMENT
LOWpkg/objstore/local.go214 // like #49423. We just return 0 size and let the caller handle it in laterCOMMENT
MEDIUMpkg/dxf/framework/doc.go42// To fully utilize the resources and avoid resource overuse, we abstract theCOMMENT
MEDIUMpkg/executor/index_merge_reader.go1549// table partition ranges results on that index plan path). Since every partial index path is a sorted select result, weCOMMENT
Structural Annotation Overuse53 hits · 93 pts
SeverityFileLineSnippetContext
LOWbr/tests/br_pitr_table_filter/run.sh1114 # Step 1: Get the Base64 encoded storage URLCOMMENT
LOWbr/pkg/restore/log_client/client.go2456 // Step 1: Process DELETIONS in dependency-safe order (tables first, then databases)COMMENT
LOWbr/pkg/restore/log_client/client.go2521 // Step 2: Process ADD/UPDATE operations in dependency-safe order (databases first, then tables)COMMENT
LOWpkg/statistics/histogram.go1116 // Step 1: Calculate a default of "one value"COMMENT
LOWpkg/statistics/histogram.go1121 // Step 2: If modifications are not allowed, return the one value.COMMENT
LOWpkg/statistics/histogram.go1129 // Step 3: Adjust oneValue if the NDV is lowCOMMENT
LOWpkg/statistics/histogram.go1136 // Step 4: Calculate how much of the statistics share a common prefix.COMMENT
LOWpkg/statistics/histogram.go1206 // Step 8: Calculate the out of range percentagesCOMMENT
LOWpkg/statistics/histogram.go1215 // Step 9: Calculate the added rowsCOMMENT
LOWpkg/statistics/histogram.go1222 // Step 10: Calculate the estimated rowsCOMMENT
LOWpkg/statistics/histogram.go1175 // Step 6: Convert the lower and upper bound of the histogram to scalar value(float64)COMMENT
LOWpkg/statistics/histogram.go1190 // Step 7: Calculate the width of the predicateCOMMENT
LOWpkg/statistics/histogram.go1241 // Step 11: Calculate a potential worst case for use in final MaxEstCOMMENT
LOWpkg/statistics/histogram.go1259 // Step 12: Calculate the final min/max/est rows including the skew ratio adjustmentCOMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go439// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go493// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go731// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go1017// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go1074// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go1128// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go1185// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go1198// NOTE: This function is thread-safe.COMMENT
LOW…g/statistics/handle/autoanalyze/priorityqueue/queue.go1242// NOTE: This function is thread-safe.COMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go50 // Step 1: Insert a pending job using the StatsHandle API.COMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go59 // Step 2: Start the job.COMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go66 // Step 3: Mark the job as failed.COMMENT
LOW…iorityqueue/intervaltimezone/interval_timezone_test.go69 // Step 4: Query via the stats session pool.COMMENT
LOWpkg/util/topsql/reporter/ru_window_aggregator.go144 // Step 1: take buckets under lock.COMMENT
LOWpkg/util/topsql/reporter/ru_window_aggregator.go150 // Step 2: build report records outside lock.COMMENT
LOWpkg/planner/core/joinorder/util.go373 // Step 1: Direct match by table nameCOMMENT
LOWpkg/planner/core/joinorder/util.go401 // Step 2: Match by query-block alias (subquery name)COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3047 // Step 1: begin(when i = 0).COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3052 // Step 2: prepare stmts.COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3063 // Step 3: begin.COMMENT
LOWpkg/server/internal/testserverclient/server_client.go3077 // Step 4: exec stmts in write-only state (dropping a colum).COMMENT
LOWpkg/executor/write.go160 // Step 1: non-generated columns (These columns should be evaluated outside this function).COMMENT
LOWpkg/executor/write.go161 // Step 2: check whether there are some columns changed.COMMENT
LOWpkg/executor/write.go162 // Step 3: on-update-now columns if non-generated columns are changed.COMMENT
LOWpkg/executor/write.go163 // Step 4: generated columns if non-generated columns are changed.COMMENT
LOWpkg/executor/write.go164 // Step 5: handle foreign key errors, bad null errors and exchange partition errors.COMMENT
LOWpkg/executor/write.go167 // Step 2: compare already evaluated columns and update changed, handleChanged and handleChanged flags.COMMENT
LOWpkg/executor/write.go189 // Step 3: fill values into on-update-now fields.COMMENT
LOWpkg/executor/write.go213 // Step 4: fill auto generated columnsCOMMENT
LOWpkg/executor/write.go249 // Step 5: handle foreign key errors, bad null errors and exchange partition errors.COMMENT
LOWpkg/executor/show_affinity_test.go196 // Step 1: Create table firstCOMMENT
LOWpkg/executor/show_affinity_test.go200 // Step 2: Get actual table ID from sessionCOMMENT
LOWpkg/executor/show_affinity_test.go206 // Step 3: Set up mock PD clientCOMMENT
LOWpkg/executor/show_affinity_test.go211 // Step 4: Mock the GetAllAffinityGroups call with actual group IDCOMMENT
LOWpkg/executor/show_affinity_test.go226 // Step 5: Execute query and verify resultsCOMMENT
LOWpkg/executor/show_affinity_test.go258 // Step 1: Create table firstCOMMENT
LOWpkg/executor/show_affinity_test.go262 // Step 2: Set up mock PD clientCOMMENT
LOWpkg/executor/show_affinity_test.go267 // Step 3: Mock PD response with empty map (group not found)COMMENT
LOWpkg/executor/show_affinity_test.go272 // Step 4: Test that all PD-related fields show as native NULL when group not found in PDCOMMENT
Cross-File Repetition15 hits · 75 pts
SeverityFileLineSnippetContext
HIGH…pling/tests/naughty_strings/data/naughty_strings.t.sql0''"'), ('<foo val=“bar” />'), ('<foo val=“bar” />'), ('<foo val=”bar“ />'), ('<foo val=`bar'' />'), ('田中さんにあげて下さい'), ('パSTRING
HIGHdumpling/tests/e2e_csv/data/e2e_csv.t.sql0''"'), ('<foo val=“bar” />'), ('<foo val=“bar” />'), ('<foo val=”bar“ />'), ('<foo val=`bar'' />'), ('田中さんにあげて下さい'), ('パSTRING
HIGH…ing/tests/naughty_strings/expect/naughty_strings.t.sql0''"'), ('<foo val=“bar” />'), ('<foo val=“bar” />'), ('<foo val=”bar“ />'), ('<foo val=`bar'' />'), ('田中さんにあげて下さい'), ('パSTRING
HIGH…pling/tests/naughty_strings/data/naughty_strings.t.sql0onfocus=javascript:alert(123) autofocus'), ('<script>alert(123)</script>'), ('<sc<script>ript>alert(123)</sc</script>ripSTRING
HIGH…ing/tests/naughty_strings/expect/naughty_strings.t.sql0onfocus=javascript:alert(123) autofocus'), ('<script>alert(123)</script>'), ('<sc<script>ript>alert(123)</sc</script>ripSTRING
HIGHdumpling/tests/e2e_csv/data/e2e_csv.t.sql0onfocus=javascript:alert(123) autofocus'), ('<script>alert(123)</script>'), ('<sc<script>ript>alert(123)</sc</script>ripSTRING
HIGH…pling/tests/naughty_strings/data/naughty_strings.t.sql0), ('javascript:alert(123)'), (';alert(123);'), ('src=javascript:prompt(132)'), ('"><script>alert(123);</script x="'), (STRING
HIGH…ing/tests/naughty_strings/expect/naughty_strings.t.sql0), ('javascript:alert(123)'), (';alert(123);'), ('src=javascript:prompt(132)'), ('"><script>alert(123);</script x="'), (STRING
HIGHdumpling/tests/e2e_csv/data/e2e_csv.t.sql0), ('javascript:alert(123)'), (';alert(123);'), ('src=javascript:prompt(132)'), ('"><script>alert(123);</script x="'), (STRING
HIGH…pling/tests/naughty_strings/data/naughty_strings.t.sql0), ('><script>alert(123);</script x='), ('" autofocus onkeyup="javascript:alert(123)'), (STRING
HIGH…ing/tests/naughty_strings/expect/naughty_strings.t.sql0), ('><script>alert(123);</script x='), ('" autofocus onkeyup="javascript:alert(123)'), (STRING
HIGHdumpling/tests/e2e_csv/data/e2e_csv.t.sql0), ('><script>alert(123);</script x='), ('" autofocus onkeyup="javascript:alert(123)'), (STRING
HIGH…pling/tests/naughty_strings/data/naughty_strings.t.sql0><script>alert("xss")</script>">'), ('<img src=javascript:alert(string.fromcharcode(88,83,83))>'), ('<img src=# onmouseoSTRING
HIGHdumpling/tests/e2e_csv/data/e2e_csv.t.sql0><script>alert("xss")</script>">'), ('<img src=javascript:alert(string.fromcharcode(88,83,83))>'), ('<img src=# onmouseoSTRING
HIGH…ing/tests/naughty_strings/expect/naughty_strings.t.sql0><script>alert("xss")</script>">'), ('<img src=javascript:alert(string.fromcharcode(88,83,83))>'), ('<img src=# onmouseoSTRING
TODO Padding15 hits · 22 pts
SeverityFileLineSnippetContext
LOWpkg/types/datum.go1032 switch target.GetType() { // TODO: implement mysql types convert when "CAST() AS" syntax are supported.CODE
LOWpkg/bindinfo/binding_plan_evolution.go107 // TODO: implement thisCOMMENT
LOWpkg/planner/core/task.go1452 // TODO: implement it by TopN/buckets and adjust it by session variable.COMMENT
LOWpkg/planner/core/expression_rewriter.go308 // TODO: implement ScalarSubQuery and resolve it during optimizing. In building phase, we will not change the plan's COMMENT
LOWpkg/planner/core/point_get_plan.go433 // TODO: Add test and remove this!COMMENT
LOWpkg/ddl/partition.go3943 // TODO: Add test that kills (like `kill -9`) the currently runningCOMMENT
LOWpkg/ddl/partition.go4627 // TODO: Add test for this!COMMENT
LOWpkg/ddl/add_column.go607 // TODO: implement the behavior as MySQL when explicit_defaults_for_timestamp = off, then this function could return faCOMMENT
LOWpkg/ddl/tests/partition/multi_domain_test.go1440 // TODO: Add tests for deleteCOMMENT
LOWpkg/ddl/tests/partition/multi_domain_test.go1634 // TODO: Add tests for delete as wellCOMMENT
LOWpkg/meta/model/table.go1143 // TODO: Add tests!COMMENT
LOWpkg/meta/model/table.go1180 // TODO: Add tests for ADD PARTITION multi-domain with Global Index!COMMENT
LOWpkg/store/mockstore/unistore/tikv/server.go1137 // TODO: implement ObserverCOMMENT
LOWpkg/store/mockstore/unistore/tikv/server.go1150 // TODO: implement ObserverCOMMENT
LOWpkg/store/mockstore/unistore/tikv/server.go1156 // TODO: implement ObserverCOMMENT
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMbr/tests/br_pitr_online_table_filter/run.sh78 # Create a new database with the same name and different dataCOMMENT
MEDIUMbr/tests/br_parallel_restore/run.sh461 # Create a paused task for $DB firstCOMMENT
MEDIUMbr/tests/br_parallel_restore/run.sh672 # Create a paused task and manually change it to runningCOMMENT
MEDIUMbr/tests/br_merge_option_attributes/run.sh27# Create the test directory and copy certs if they existCOMMENT
MEDIUMbr/tests/br_merge_option_attributes/run.sh47# Create the test directory and copy certs if they existCOMMENT
MEDIUMbr/tests/br_pitr_table_filter/run.sh376 # Create the tables but don't populate them with the standard valuesCOMMENT
Redundant / Tautological Comments10 hits · 15 pts
SeverityFileLineSnippetContext
LOWlightning/tests/lightning_compress/run.sh27 # Set minDeliverBytes to a small enough number to only write only 1 row each timeCOMMENT
LOWlightning/tests/lightning_examples/run.sh49# Check if rest of the imported data really matchCOMMENT
LOWlightning/tests/lightning_checkpoint_columns/run.sh28# Set minDeliverBytes to a small enough number to only write only 1 row each timeCOMMENT
LOWbr/tests/br_z_gc_safepoint/run.sh42# Set ratelimit to 40960 bytes/second, it will finish within 25s,COMMENT
LOWbr/tests/br_pitr_gc_safepoint/run.sh51# Check if "log-backup-coordinator" existsCOMMENT
LOWbr/tests/br_check_dup_table/run.sh58# Check if the log contains 'ErrTableAlreadyExisted'COMMENT
LOWbr/tests/br_check_dup_table/run.sh72# Check if the log contains 'ErrTableAlreadyExisted'COMMENT
LOWbr/tests/br_region_rule/run.sh83# Check if region label rule 'schedule=deny' exists.COMMENT
LOWbr/tests/br_blocklist/run.sh264# Check if correctly blockedCOMMENT
LOWbr/tests/br_blocklist/run.sh278 # Check if restore unexpectedly succeededCOMMENT
Slop Phrases4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMlightning/tidb-lightning.toml271# pattern and path determine target source files, you can use either of them but not both.COMMENT
MEDIUMbr/cmd/br/restore.go113 fmt.Println("# you can use '--with-sys-table=false' to skip restoring system tables")CODE
LOWpkg/statistics/handle/cache/statscacheinner.go66// The returned value should be read-only, if you update it, don't forget to use Put to put it back again, otherwise theCOMMENT
LOWpkg/planner/core/plan_cache_utils.go722// Don't forget to reset this executor when the prior plan is invalid.COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHlightning/pkg/importer/import.go1056 // periodically switch to import mode, as requested by TiKV 3.0COMMENT
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippetContext
LOW…clusterintegrationtest/python_testers/vector_recall.py178def compact_and_wait_index_built():CODE
LOW…s/design/2023-11-29-priority-queue-for-auto-analyze.md119function calculateAvgChangeForPartitions(partitionStats, defs, autoAnalyzeRatio):CODE
LOW…s/design/2023-11-29-priority-queue-for-auto-analyze.md137function calculateChangePercentage(tblStats, autoAnalyzeRatio):CODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOW…ests/br_tiflash_conflict/prepare_data/prepare_data.sql43(1, 'John Doe', 30, 50000.00, '2020-01-15'),CODE
LOWpkg/structure/structure_test.go289 err = tx.HDel(key, []byte("fake_key"))CODE
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOW…clusterintegrationtest/python_testers/vector_recall.py94CODE