Commit 2bddf43
Merge #158882
158882: sql/ttl: use AOST timestamp when computing query bounds r=rafiss a=rafiss
Previously, when computing query bounds from spans in the TTL job
processor, we used the current timestamp for the KV Scan/ReverseScan
operations. This could cause contention with foreground traffic.
This change updates the TTL processor to use the same AOST (As Of
System Time) timestamp for computing query bounds that is already
used for the SELECT queries. This aligns the bounds computation with
the historical time at which the TTL job operates, reducing load on
the system and improving overall efficiency.
Existing TTL tests pass (`TestRowLevelTTLJobRandomEntries`, `TestRowLevelTTLJobMultipleNodes`, etc.).
Resolves: #155871
Epic: CRDB-55074
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Rafi Shamim <[email protected]>2 files changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
298 | 297 | | |
299 | 298 | | |
300 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
| |||
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
312 | | - | |
| 315 | + | |
313 | 316 | | |
314 | 317 | | |
315 | 318 | | |
| |||
0 commit comments