renew

open suspend fun renew(type: AggregateType, generation: Int): SnapshotTable?

Fills type's table again from the log's beginning at generation, the operator's step for a table removed under its record (or emptied in place): a claim whose configured generation is above its record's renews it. While the record's SnapshotTable.generation is lower, the store makes the table's structure (its index, table or collection) when it is missing, the one moment beside a first claim that the store creates it, and then resets the record, in that order: not SnapshotTable.backfilled, filled by SnapshotFill.BACKFILL, not SnapshotTable.removed, at generation; its revision and SnapshotTable.rebuilding stay as they are, so the reset needs no revision. A record at generation or above is left as it is (a lowered generation is the record's to keep, and renewals of one generation by several nodes are one). It returns the record after, or null when the table has no record (a first claim comes first) or the store cannot renew.

It empties nothing: a raised key never deletes data. The backfill writes through the version-guarded save, so every aggregate of the log ends at its latest version over an older kept row, a kept row the log does not exceed stays as it is, and a row of an aggregate the log does not hold stays for good: a table that may hold what the log does not is removed before its generation is raised.

A fresh table under a generation above 1 (a store changed while its key stays raised) is so a claim, then a renewal: one more pass of a backfill over the type's log, which writes what the store's subscription writes, so it is harmless.

The default cannot (null). A store that records a table SnapshotTable.removed and does not override this keeps that table removed for good: a store that tells removal renews. The TCK's SnapshotStoreSpec checks every store whose renewal of a claimed table answers its record, asking the store itself.