refactor: drop unused retrieval namespace statistics - #366
Merged
Conversation
…handling This commit removes the RetrievalServingRevisionStat model and its associated logic from the document lifecycle and backfill processes. The changes include the removal of calls to rebuild namespace serving statistics and the deletion of related database entries, streamlining the document archiving process. Additionally, the backfill script has been updated to reflect these changes, ensuring it no longer attempts to rebuild statistics for archived documents.
EricNGOntos
deleted the
feat/wuchengke/drop-unused-namespace-statistics
branch
September 1, 2026 02:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
retrieval_serving_revision_stats,retrieval_namespace_stats, andretrieval_namespace_token_statspaths from publication, archive, and backfill.document_map_unit_tokens/document_map_units/document_map_unit_indexes) plus revision manifests, namespace MAP snapshots, and generation advances.9f0a1b2c3d4eto drop the three tables in place; remove obsolete design docs/tests that asserted the dead stats path.Test plan
make check(ruff + pyright) on rebased branchalembic upgradethat drops the three tablespython /app/scripts/backfill_map_unit_indexes.py --applyfrom the new API imagepython /app/scripts/backfill_map_unit_indexes.py --checkreaches READYMade with Cursor