Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions troubleshoot-hot-spot-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```

Expand All @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion troubleshoot-write-conflicts.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ tiup ctl:v<CLUSTER_VERSION> 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 查找具体的索引名:
Expand Down