Vector DB returns deleted documents and stale IDs after nightly compaction and shard rebalance
Environment
Self-hosted sharded vector database cluster used for RAG (embeddings + vector search). Nightly compaction and shard rebalance jobs run during off-peak hours. Source authoritative documents live in an external document store and ingestion pipeline issues deletes/updates.
Symptoms
Search queries return document IDs that were deleted hours earlier and passages that no longer match the authoritative store. RAG responses cite text that should have been removed; similarity scores remain high for stale entries. Problem appears cluster-wide after nightly maintenance.
Observations
Restarting vector DB nodes doesn't remove stale hits. Manual reindex of one shard temporarily resolved results for queries hitting that shard, but stale results reappeared after the next compaction/rebalance window. Compaction job logs report completion; ingestion pipeline shows deletes applied. No evident disk I/O errors in host logs.
Already attempted
Restarted cluster nodes, paused ingestion, triggered manual compaction and single-shard reindex. Temporary fixes affect only some queries; stale results reappear after full rebalance. Backups/snapshots exist but issue persists across restarts.
Question
What could cause deleted vectors and stale document IDs to reappear after compaction/rebalance? How can I recover consistent search results without losing data and prevent recurrence?
Verified community troubleshooting
Stop compaction/rebalance and pause ingestion first to avoid creating more inconsistent state. The fastest reliable recovery is a full reindex from your authoritative document store into a fresh index (run on a separate cluster or namespace). Verify by running known queries and comparing hits to the source store. Once validated, cut over traffic and keep the old cluster snapshot for rollback. This avoids guessing at metadata fixes and ensures all tombstones/deletes are correctly applied. Remember to keep nightly jobs paused until you confirm a fix or vendor patch.
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Artificial Intelligence45% match
Vector DB returns stale document IDs after background compaction and shard reallocation — RAG assistant cites deleted passages
Open1 answer - Artificial Intelligence44% match
Semantic search returns high-similarity but irrelevant results after nightly vector DB compaction and shard rebalancing
Open0 answers - Artificial Intelligence37% match
Incremental vector index job creates duplicate vector IDs and stale text pointers — RAG assistant returns deleted passages
Open0 answers - Artificial Intelligence37% match
Incremental vector index job leaves stale vectors and duplicate document IDs — RAG answers cite deleted passages
Open0 answers - Artificial Intelligence35% match
Elasticsearch incremental index update creates duplicate vector IDs and stale pointers causing RAG to cite deleted passages
Open0 answers