Repository navigation
feat: a no-op expire answers from the column's extent, not a zone-map probe per group (#1310) - #1326
Conversation
3ba4be3 to
6e81d07
Compare
…ommandprompt#1310) Seen red on PG17: fifty groups, fifty zone_map scans. The guards beside it are green on this tree: without the extent it still probes every group, with it the same groups retire, and aged rows written in expire's own transaction are retired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-map probe per group (commandprompt#1310) When the retention column's extent puts its minimum at or past the cutoff, no group's maximum is below it, so nothing can qualify. Built on commandprompt#1304 option 5, whose bound includes the transaction's own flushed groups. ttl_expire.sh 65/65 on PG17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… with only NULLs The twin was seen red on PG17 against the tree before the early exit: forty groups, forty zone_map scans. The NULL arm was written after the code and is dated by a mutation of the !hasValues clause, not by the red-first run. Check names carry no counts, since the twins' fixtures differ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…commandprompt#1236) A mutation of expire's early exit (the extent's maximum compared instead of its minimum) reddens it, so it measures the code under test. Renamed in both twins, at jdatcmd's request on commandprompt#1304. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions (commandprompt#1310) ttl_expire.sh 67/67 and test_ttl_expire.py 9/9 on each of PG15-19. Seeded at jdatcmd's request on commandprompt#1304; suites_not_covered 247 -> 246. Ledger 2162 / 1756. cluster_tests 518 -> 519 by collection. TESTS.md and CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e planner's The same out-parameter shape gcc 13/14 with LTO reported as maybe-uninitialized on commandprompt#1325; emin and emax are read only when hasValues is true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6e81d07 to
4fd0480
Compare
|
@jdatcmd #1325 merged, so this is rebased onto 11f954e. It is now just this PR's six commits, at 4fd0480. The tree is byte-identical to the one verified at 6e81d07 ( |
jdatcmd
left a comment
There was a problem hiding this comment.
Approved at 4fd0480. Merging when CI is green on this head.
The early exit is sound. The loop retires a group only when its maximum is strictly below the cutoff (c < 0). Every group's maximum is at least the extent's minimum, so min >= cutoff means no group can qualify, and that includes the case where they are equal. A column with no values exits too, and the loop agrees: it skips every group without a min/max. The same active snapshot serves the extent and the loop, and a too-wide extent costs only the early exit.
The ledger is right. Main's 2192 rows are unchanged. ttl_expire enters with 67 rows: 2259 in all, of which 1796 are never red, matching the budget. suites_not_covered goes from 247 to 246. The renamed premise is now an arm, and a mutation is what dates it (#1236).
The twins match. Both carry the six new or renamed checks with identical names, and the pytest file states it is independent of ttl_expire.sh.
I checked this by reading and by the ledger arithmetic. I did not run the suites locally; CI's suites jobs are the run.
Fixes #1310. #1325 has merged, so this is now rebased onto main (11f954e): six commits, starting at 0e32c6c.
What it does
This follows the plan you wrote on #1310. Most of the daemon's passes retire nothing, and
expireproved that with one zone-map probe per row group. When the retention column's extent puts its minimum at or past the cutoff, no group's maximum is below it, so nothing can qualify, andexpirereturns 0 after one index lookup. Otherwise it decides group by group, as before. A column with no value at all has nothing to retire either. A too-wide extent only means no early exit; with no complete extent the loop runs as before.Measured as zone-map scans for a no-op
expireover 50 groups: 50 before, 0 after.Arms, in both twins (the names match; the fixtures differ)
expirereads no zone map when the extent's minimum is past the cutoff (red first: 50 scans, 40 in the twin)expireprobes every group's zone mapexpireretires the same groups as without itexpirein the transaction that wrote aged rows retires their groups. This relies on feat: a per-column extent the planner reads in one lookup, recomputed whenever groups go (#1304 option 5) #1325's own-transaction fold.expireon a column of only NULLs reads no zone mapMutations (PG17), each red on its own arms
Your two answers on #1304, applied
ttl_expireenters the ledger. All 67 checks are in, 16 dated by the four mutations, and no premise is dated.suites_not_coveredgoes 247 → 246, and the census goes 1745 → 1796 over 2259 rows. The gate gives rc=0.premise: expire retired the three aged groupsis now an arm, in both twins (expire retired the three aged groups). The max-for-min mutation reddens it.Evidence
ttl_expire.sh67/67 andtest_ttl_expire.py9/9 on PG15–19.ttl_expire,column_extent) 16/16.expire's extent bounds are initialised, the same LTO maybe-uninitialized shape feat: a per-column extent the planner reads in one lookup, recomputed whenever groups go (#1304 option 5) #1325's review found in the planner.cluster_tests524 → 525, by collection. TESTS.md section 78 and the CHANGELOG are updated.🤖 Generated with Claude Code