From cd863c9f8fec49adf132d37fa0b7e21dc308a496 Mon Sep 17 00:00:00 2001 From: houfaxin Date: Tue, 4 Nov 2025 16:36:41 +0800 Subject: [PATCH] Standardize variable naming in troubleshooting docs Updated variable names from camelCase (e.g., tableID, indexID, rowID) to PascalCase (TableID, IndexID, RowID) in code and command examples for consistency and clarity across troubleshoot-hot-spot-issues.md and troubleshoot-write-conflicts.md. --- troubleshoot-hot-spot-issues.md | 8 ++++---- troubleshoot-write-conflicts.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/troubleshoot-hot-spot-issues.md b/troubleshoot-hot-spot-issues.md index 24cedca4862f..4def314cea9d 100644 --- a/troubleshoot-hot-spot-issues.md +++ b/troubleshoot-hot-spot-issues.md @@ -21,7 +21,7 @@ TiDB 对每个表分配一个 TableID,每一个索引都会分配一个 IndexI 每行数据按照如下规则进行编码成 Key-Value pair: ```text -Key: tablePrefix{tableID}_recordPrefixSep{rowID} +Key: tablePrefix{TableID}_recordPrefixSep{RowID} Value: [col1, col2, col3, col4] ``` @@ -30,14 +30,14 @@ Value: [col1, col2, col3, col4] 对于 Index 数据,会按照如下规则编码成 Key-Value pair: ```text -Key: tablePrefix{tableID}_indexPrefixSep{indexID}_indexedColumnsValue +Key: tablePrefix{TableID}_indexPrefixSep{IndexID}_indexedColumnsValue Value: rowID ``` -Index 数据还需要考虑 Unique Index 和非 Unique Index 两种情况,对于 Unique Index,可以按照上述编码规则。但是对于非 Unique Index,通过这种编码并不能构造出唯一的 Key,因为同一个 Index 的 `tablePrefix{tableID}_indexPrefixSep{indexID}` 都一样,可能有多行数据的 `ColumnsValue` 是一样的,所以对于非 Unique Index 的编码做了一点调整: +Index 数据还需要考虑 Unique Index 和非 Unique Index 两种情况,对于 Unique Index,可以按照上述编码规则。但是对于非 Unique Index,通过这种编码并不能构造出唯一的 Key,因为同一个 Index 的 `tablePrefix{TableID}_indexPrefixSep{IndexID}` 都一样,可能有多行数据的 `ColumnsValue` 是一样的,所以对于非 Unique Index 的编码做了一点调整: ```text -Key: tablePrefix{tableID}_indexPrefixSep{indexID}_indexedColumnsValue_rowID +Key: tablePrefix{TableID}_indexPrefixSep{IndexID}_indexedColumnsValue_rowID Value: null ``` diff --git a/troubleshoot-write-conflicts.md b/troubleshoot-write-conflicts.md index 4afdf203a958..c6cec5863634 100644 --- a/troubleshoot-write-conflicts.md +++ b/troubleshoot-write-conflicts.md @@ -79,7 +79,7 @@ tiup ctl:v pd -u https://127.0.0.1:2379 tso {TIMESTAMP} {{< copyable "" >}} ```shell -curl http://{TiDBIP}:10080/db-table/{tableID} +curl http://{TiDBIP}:10080/db-table/{TableID} ``` 通过 indexID 查找具体的索引名: