Skip to content

Commit 4bc5784

Browse files
authored
fix typo in index key encoding format (tableID -> TableID, indexID -> IndexID) (#21044) (#21045)
1 parent 9505c82 commit 4bc5784

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

troubleshoot-hot-spot-issues.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TiDB 对每个表分配一个 TableID,每一个索引都会分配一个 IndexI
2020
每行数据按照如下规则进行编码成 Key-Value pair:
2121

2222
```text
23-
Key: tablePrefix{tableID}_recordPrefixSep{rowID}
23+
Key: tablePrefix{TableID}_recordPrefixSep{RowID}
2424
Value: [col1, col2, col3, col4]
2525
```
2626

@@ -29,14 +29,14 @@ Value: [col1, col2, col3, col4]
2929
对于 Index 数据,会按照如下规则编码成 Key-Value pair:
3030

3131
```text
32-
Key: tablePrefix{tableID}_indexPrefixSep{indexID}_indexedColumnsValue
32+
Key: tablePrefix{TableID}_indexPrefixSep{IndexID}_indexedColumnsValue
3333
Value: rowID
3434
```
3535

36-
Index 数据还需要考虑 Unique Index 和非 Unique Index 两种情况,对于 Unique Index,可以按照上述编码规则。但是对于非 Unique Index,通过这种编码并不能构造出唯一的 Key,因为同一个 Index 的 `tablePrefix{tableID}_indexPrefixSep{indexID}` 都一样,可能有多行数据的 `ColumnsValue` 是一样的,所以对于非 Unique Index 的编码做了一点调整:
36+
Index 数据还需要考虑 Unique Index 和非 Unique Index 两种情况,对于 Unique Index,可以按照上述编码规则。但是对于非 Unique Index,通过这种编码并不能构造出唯一的 Key,因为同一个 Index 的 `tablePrefix{TableID}_indexPrefixSep{IndexID}` 都一样,可能有多行数据的 `ColumnsValue` 是一样的,所以对于非 Unique Index 的编码做了一点调整:
3737

3838
```text
39-
Key: tablePrefix{tableID}_indexPrefixSep{indexID}_indexedColumnsValue_rowID
39+
Key: tablePrefix{TableID}_indexPrefixSep{IndexID}_indexedColumnsValue_rowID
4040
Value: null
4141
```
4242

troubleshoot-write-conflicts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ tiup ctl:v<CLUSTER_VERSION> pd -u https://127.0.0.1:2379 tso {TIMESTAMP}
7878
{{< copyable "" >}}
7979

8080
```shell
81-
curl http://{TiDBIP}:10080/db-table/{tableID}
81+
curl http://{TiDBIP}:10080/db-table/{TableID}
8282
```
8383

8484
通过 indexID 查找具体的索引名:

0 commit comments

Comments
 (0)