Skip to content

Fix initial virtual chunks leaving ghost indices in some scenarios#12645

Merged
rerun-sync[bot] merged 5 commits intomainfrom
cmc/fix_init_virtual_chunks_missing
Feb 18, 2026
Merged

Fix initial virtual chunks leaving ghost indices in some scenarios#12645
rerun-sync[bot] merged 5 commits intomainfrom
cmc/fix_init_virtual_chunks_missing

Conversation

@teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Feb 17, 2026

When initializing a virtual ChunkStore via ChunkStore::insert_rrd_manifest, it was possible (and even somewhat likely) to end up in scenarios where the original virtual chunks would keep declaring themselves as missing forever, leading to infinite spinners all over the place.

This was caused by an oversight on the write path, which didn't account for these ghost indexes. This PR fixes that.

That's the entire fix:

if matches!(
    self.direct_lineage(&chunk.id()),
    Some(&ChunkDirectLineage::ReferencedFrom(_))
) {
    // If we reach here, then a chunk that was previously virtually inserted using `insert_rrd_manifest`
    // is about to be physically inserted for real.
    //
    // We don't know what's gonna to happen to this chunk during its insertion: it might be
    // added as-is, or be compacted into another existing chunk, or immediately be split into
    // smaller chunks.
    // If the chunk doesn't get inserted as-is, for whatever reason, then it will leave behind
    // it the ghost indexes from its original virtual insertion, which will lead downstream
    // systems to believe that some chunk is missing, forever, even though it's not: it just has
    // been inserted under a different name.
    //
    // The fix is simple: always unconditionally clean up the indexes when a virtual chunk
    // gets physically inserted.
    all_diffs.extend(
        self.remove_chunks_deep(vec![chunk.clone()], None)
            .into_iter()
            .map(Into::into),
    );
}

Before:
image

After:
image

Source-Ref: 8c5c65c904a08cc3511f61acfe579e44da3ff0df
Source-Ref: 864abde2076590bd552fb921821eb70d3d5fc561
Source-Ref: 65d5b90f2b2844696aff4aa146209afeb52b7248
Source-Ref: 7f201ba5b4b68aff71b92c55b8646b93a713808b
Source-Ref: 7bbef1f3bba0442e15c0b5e8e79bd2ca1b21419a
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

Web viewer built successfully.

Result Commit Link Manifest
8759e4f https://rerun.io/viewer/pr/12645 +nightly +main

View image diff on kitdiff.

Note: This comment is updated whenever you push a commit.

@rerun-sync rerun-sync bot added 🪳 bug Something isn't working exclude from changelog PRs with this won't show up in CHANGELOG.md 📺 re_viewer affects re_viewer itself dataplatform Rerun Data Platform integration labels Feb 17, 2026
@rerun-sync rerun-sync bot merged commit b866123 into main Feb 18, 2026
54 of 55 checks passed
@rerun-sync rerun-sync bot deleted the cmc/fix_init_virtual_chunks_missing branch February 18, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪳 bug Something isn't working dataplatform Rerun Data Platform integration exclude from changelog PRs with this won't show up in CHANGELOG.md 📺 re_viewer affects re_viewer itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant