Skip to content

Commit d5d5964

Browse files
authored
v8.5.7: add max-ts configuration docs for v8.5.7 (#23197)
1 parent 36744af commit d5d5964

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

tikv-configuration-file.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,34 @@ Configuration items related to the I/O rate limiter.
636636
+ Value options: `"read-only"`, `"write-only"`, and `"all-io"`
637637
+ Default value: `"write-only"`
638638

639+
## storage.max-ts
640+
641+
Configuration items related to `max-ts`.
642+
643+
`max-ts` is the maximum read timestamp known to the current TiKV node. It ensures linearizability and transaction concurrency control semantics for async commit and one-phase commit (1PC) transactions.
644+
645+
### `action-on-invalid-update` <span class="version-mark">New in v8.5.7</span>
646+
647+
+ Determines how TiKV handles invalid `max-ts` update requests. If a read or write request uses a timestamp that exceeds **the sum of the PD TSO cached in TiKV and [`max-drift`](#max-drift-new-in-v857)**, TiKV considers it an invalid `max-ts` update request. Invalid `max-ts` update requests might break the linearizability and transaction concurrency control semantics of the TiDB cluster.
648+
+ Value options:
649+
+ `"panic"`: TiKV panics. If the PD TSO cached in TiKV is not updated in time, TiKV uses an approximate method for validation, in which case invalid requests do not cause TiKV panic.
650+
+ `"error"`: TiKV returns an error and stops processing the request.
651+
+ `"log"`: TiKV prints an error log but still processes the request.
652+
+ Default value: `"error"`
653+
654+
### `cache-sync-interval` <span class="version-mark">New in v8.5.7</span>
655+
656+
+ Controls the interval at which TiKV updates its local PD TSO cache. TiKV periodically retrieves the latest timestamp from PD and caches it locally to check the validity of `max-ts`.
657+
+ Default value: `"15s"`
658+
659+
### `max-drift` <span class="version-mark">New in v8.5.7</span>
660+
661+
+ Specifies the maximum time by which the timestamp of a read or write request can exceed the PD TSO cached in TiKV.
662+
+ If a read or write request uses a timestamp that exceeds **the sum of the PD TSO cached in TiKV and `max-drift`**, TiKV considers it an invalid `max-ts` update request and handles it according to the [`action-on-invalid-update`](#action-on-invalid-update-new-in-v857) configuration.
663+
+ Default value: `"60s"`
664+
+ This value must be greater than [`cache-sync-interval`](#cache-sync-interval-new-in-v857). Otherwise, TiKV fails configuration validation and cannot start.
665+
+ It is recommended to set this value to at least three times the value of [`cache-sync-interval`](#cache-sync-interval-new-in-v857).
666+
639667
## pd
640668

641669
### `enable-forwarding` <span class="version-mark">New in v5.0.0</span>

0 commit comments

Comments
 (0)