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
DictNovelty overflow special case keyed on 0xFFFF never fires #1843
fluree-db-core/src/dict_novelty.rs and fluree-db-core/src/ns_vec_bi_dict.rs each define a private NS_OVERFLOW: u16 = 0xFFFF, but the overflow namespace is fluree_vocab::namespaces::OVERFLOW = 0xFFFE (0xFFFF is the Sid::max() sentinel). The dedicated overflow handling keyed on 0xFFFF never runs:
NsVecBiDict has scalar watermark/next-id fields and a separate entry vector so that overflow subjects do not resize the per-namespace vectors to 65,536 entries. Real overflow subjects (0xFFFE) take the ordinary per-namespace path, so a ledger with any overflow subject in novelty grows those vectors to 65,535 entries.
DictNovelty::with_watermarks / retire_seen_through split off an overflow watermark at index 0xFFFF. The index root serializes the watermark count as a u16, so that index can never exist.
This is not a correctness bug today. The indexer also treats 0xFFFE as an ordinary watermark slot (incremental_resolve.rs), so novelty and the index agree on local-id allocation.
Options:
Point the constants at namespaces::OVERFLOW so overflow subjects use the dedicated path. The persisted watermark vector already carries index 0xFFFE, so with_watermarks would extract it correctly. This still changes allocation, retirement, and layer_above behaviour for overflow subjects and needs tests covering commit → index → retire with overflow subjects.
Delete the dead overflow special case and document that overflow is an ordinary slot.
The comments were corrected to describe current behaviour in #1829; the code was left unchanged.
Activity
fix(export): resolve overflow subject IRIs from novelty