You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Order index roots replaced at the same t by a sequence on the index head #2178
#2140 (pooled named graphs, on next) lets an index root be replaced at the same t: a compaction folds the pooled delta into its base, and a reindex can rebuild at the head t. index_t then no longer orders a ledger's roots. #2140 orders them with the installed root's prev_index link, one hop deep: a reader refuses to step back to the root its own root replaced (is_replaced_by in fluree-db-ledger/src/lib.rs).
Two replacements at one t get past that rule. Take compaction A → B, then a reindex or a second compaction B → C. A reader on C that acts on a record read before B (still naming A) finds A is neither C nor the root C replaced (B), so it steps back two hops to A. A holds the same t, so the reader serves the uncompacted layout until its next refresh. If A's runs and leaves were collected in the meantime, the load fails.
A monotonic sequence on the index head, bumped by every publish including a same-t replacement, would order replacement roots outright. This is the same shape as #1980 and #2052: a point in time standing in for an identity that can now change without the time moving.
Found by reading during review of #2140; not constructed.
Activity