jonnify·bcs /bcs/ideas/time-inside-the-name/the-floor-and-the-third-clock

B1.5 · dive — the floor and the third clock

Hold, borrow, never re-issue.

Strict per-node monotonicity is not a property the layout grants; it is a property the clock discipline preserves. The mint floor is monotonic, as policy of record: when the wall clock steps backwards — an NTP correction, a VM migration — the minter holds at or borrows above its last-issued millisecond and never re-issues a past one. And a TTL is a third clock entirely: the store’s time, priced on the measured table and deliberately unmerged from the name’s.

Source: content/bcs1.5.md · the discipline and the third thing; the TTL price is Chapter 1.3’s measured row (bench/valkey-id/valkey_id_bench.out).

The floor, exercised. Select a scenario; the readout computes the next-issue floor as max(wall, last-issued) over the streams record’s milliseconds.
the NTP step wall steps backwards hold at the last-issued ms the VM migration a stale wall on arrival borrow above, never re-issue the drained burst 4096 mints in one tick borrow the next millisecond
readout · Select a scenario. Static reading: a backwards wall clock holds at or borrows above the last-issued millisecond and never re-issues a past one; a burst that drains the 12-bit sequence borrows the next millisecond rather than a neighbor’s space; the fleet’s half is slewed corrections, monotonic sources, the floor rule.
§1

The discipline the minter owes

content/bcs1.5.md · What

Within one millisecond the minting law already legislates: the counter excludes node bits, and a burst that drains the sequence borrows the next millisecond rather than a neighbor’s space. This dive states the wall-clock corollary as policy of record: the mint floor is monotonic — when the wall clock steps backwards (an NTP correction, a VM migration), the minter holds at or borrows above its last-issued millisecond and never re-issues a past one.

The policy has an operational half, and the chapter names it: the fleet operates with slewed corrections, monotonic sources, and the floor rule. Strict per-node monotonicity — the property the order theorem stands on — is preserved by this discipline, not granted by the bit layout.

§2

The third clock: the store’s

content/bcs1.5.md · quoting valkey_id_bench.out

A TTL is the store’s time — priced in Chapter 1.3 as embedded object growth and enforced by the engine’s clock at expiry. The name’s time is forever; the row’s tenure is rented. The price is on the measured table:

content/echo_data/bench/valkey-id/valkey_id_bench.out · the brd14 rowsfrozen
fmt        keylen  redis7  valkey81  saved
brd14        14      88       65        23
brd14+ttl    14     128       99        29   -- branded with EX 86400
The price of the third clock. Select a row; the readout computes the per-key delta on Valkey 8.1 and names whose clock the row carries.
brd14 · 65 B/key the name alone — its time is forever brd14+ttl · 99 B/key the same name renting its row — EX 86400
readout · Select a row. Static reading: on Valkey 8.1 the expire is 99 against 65 bytes per key — an expire is +34 bytes of object growth, not a second table; the 34 bytes buy the store’s clock, embedded in the object.
§3

Deliberately unmerged

content/bcs1.5.md · What + Decisions

Retention sweeps choose by id arithmetic; expiry executes by the store — two mechanisms, deliberately unmerged. The sweep is identity time: a min_for cursor names the cutoff and everything below it goes. The expire is the store’s time: the engine’s clock ends the row’s tenure with no sweep in the loop. Merging them would put one clock’s authority behind the other clock’s claims — the exact conflation the law of two clocks exists to refuse.

The decisions of record this dive carries forward: the mint floor is monotonic, as policy of record — the minting law’s burst rule generalized to the clock itself, with the fleet discipline (slew, monotonic sources) named as its operational half; and the litmus governs here too — the store’s clock serves tenure questions, the id’s clock serves first-named questions, and neither substitutes for the other.

Where the store-side patterns live — keys, expiry, retention as a design surface — the applied course is Redis Patterns; the bus that carries the names between stores is EchoMQ.

§4

References

sources · related

Sources

Related