Skip to content

Commit 7cf57b3

Browse files
sjuddConvex, Inc.
authored andcommitted
Count multi segment indexes as a version mismatch in single segment flusher (#26947)
GitOrigin-RevId: f931bc2459cd24dbdc9a0bc2362a10cb94c3c31e
1 parent 780187a commit 7cf57b3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/database/src/text_index_worker/flusher.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ impl<RT: Runtime> TextIndexFlusher<RT> {
144144
// has grown too large or has the wrong format, it needs to be backfilled.
145145
let needs_backfill = match &on_disk_state {
146146
TextIndexState::Backfilling(_) => Some(BuildReason::Backfilling),
147-
TextIndexState::SnapshottedAt(TextIndexSnapshot { version, .. })
148-
| TextIndexState::Backfilled(TextIndexSnapshot { version, .. })
149-
if *version != expected_version =>
147+
TextIndexState::SnapshottedAt(TextIndexSnapshot { version, data, .. })
148+
| TextIndexState::Backfilled(TextIndexSnapshot { version, data, .. })
149+
if *version != expected_version
150+
|| !matches!(data, TextIndexSnapshotData::SingleSegment(_)) =>
150151
{
151152
Some(BuildReason::VersionMismatch)
152153
},

0 commit comments

Comments
 (0)