Skip to content

Commit 8656868

Browse files
author
Xin Dong
committed
No need to set the error_state inside doIndexUpdateActor since:
1. It's useless as in it does not update the IndexObj stored on disk, which means it does not effectively mark the index as in error state 2. If these error got thrown during index building, the MetadataManager will correctly update the on disk IndexObj to reflect the error state. If this error got thrown during updating existing index due to inserting new documents or updating documents, no need to change the state of the index and we can simply reject the insert/update
1 parent 79f94c8 commit 8656868

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/QLContext.actor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ struct CompoundIndexPlugin : IndexPlugin, ReferenceCounted<CompoundIndexPlugin>,
353353
}
354354

355355
if (num_new_values > DOCLAYER_KNOBS->MULTI_MULTIKEY_INDEX_MAX) {
356-
self->error_state = true;
357356
throw multikey_index_cartesian_explosion();
358357
}
359358

@@ -520,7 +519,6 @@ struct SimpleIndexPlugin : IndexPlugin, ReferenceCounted<SimpleIndexPlugin>, Fas
520519
existing_index_entries.front().arena());
521520
if (existingDocId.compare(documentPath[documentPath.size() - 1])) {
522521
// existing index points to a different doc id that has the same value, abort.
523-
self->error_state = true;
524522
throw duplicated_key_field();
525523
}
526524
}

0 commit comments

Comments
 (0)