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
reindex fails on any branch: it reads commits through the flat store and misses the ones before the fork #1984
P2Scheduled: real but not urgentarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesbugSomething isn't working as expected
Fluree::reindex fails on a branch whose history reaches back before the fork, which is every branch with a parent. It reads commits through the branch's own flat content store, so it can't find the commits that live in the source's namespace.
Indexer(Core(Storage("Failed to read commit envelope bagaybqab…: Not found: fluree:memory://mydb/dev/commit/….fcv2")))
Cause
reindex (fluree-db-api/src/admin.rs:2261) passes self.content_store(&ledger_id) to rebuild_index_from_commits_with_tracker. For a branch, that store covers the branch's namespace only. Every other path that walks a branch's commit chain uses a branch-aware store, which falls through to the parent's namespace:
the background indexer (orchestrator.rs, branched_content_store_for_record);
the ledger loader;
merge;
rebase.
Background indexing of a branch is therefore unaffected. An explicit reindex is the path that breaks.
This reaches POST /reindex (routes/ledger.rs:534) and fluree reindex.
Reproduction
Create mydb and insert one fact.
create_branch("mydb", "dev", None, None).
Insert on mydb:dev.
fluree.reindex("mydb:dev", Default::default()) fails as shown above.
Reproduced on memory storage. The store is chosen the same way on every backend.
Suggested fix
Build from self.branched_content_store(&ledger_id).await?, as the orchestrator does.
The test helper support::rebuild_and_publish_index in fluree-db-api/tests/support/mod.rs has the same flat store, so it fails on a branch too.
Add a test that reindexes a branch with commits on both sides of the fork, then checks that a reload reads both.
P2Scheduled: real but not urgentarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachesbugSomething isn't working as expected
Activity
Test index helpers read a branch's history through its source