Skip to content

fix(backup): prevent duplicate predicates in backup manifest for vector indexes#9679

Merged
matthewmcneely merged 2 commits intomainfrom
shiva/backup
Apr 8, 2026
Merged

fix(backup): prevent duplicate predicates in backup manifest for vector indexes#9679
matthewmcneely merged 2 commits intomainfrom
shiva/backup

Conversation

@shiva-istari
Copy link
Copy Markdown
Contributor

Description

Fixed a bug in ProcessBackupRequest where vecPredMap[gid] was being built using predMap[gid] as the append base instead of vecPredMap[gid]. This caused all base predicates in the group to be duplicated in the manifest every time a vector predicate was found, making manifest.json grow larger and larger with each backup.
With multiple vector predicates in the same group, each iteration also overwrote the previous result, so only the last vector predicate's supporting entries (__vector_entry, _vector, __vector_dead) were kept the rest were silently lost.

@shiva-istari shiva-istari requested a review from a team as a code owner April 7, 2026 07:13
@github-actions github-actions bot added area/core internal mechanisms go Pull requests that update Go code labels Apr 7, 2026
Copy link
Copy Markdown
Contributor

@matthewmcneely matthewmcneely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but there's no test covering the scenario where a group has multiple vector predicates with indexes. A test should:

  1. Create a schema with 2+ float32vector predicates with HNSW indexes in the same group
  2. Run ProcessBackupRequest
  3. Verify the backup request's Predicates list includes the supporting predicates (VecEntry, VecKeyword, VecDead) for all vector predicates, not just the last one

Without such a test, this exact bug pattern (appending to the wrong map key) could easily regress.

@github-actions github-actions bot added the area/testing Testing related issues label Apr 8, 2026
@matthewmcneely matthewmcneely merged commit 58da65f into main Apr 8, 2026
26 checks passed
@matthewmcneely matthewmcneely deleted the shiva/backup branch April 8, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core internal mechanisms area/testing Testing related issues go Pull requests that update Go code

Development

Successfully merging this pull request may close these issues.

2 participants