ChangeIndexer: Disable auto-rebuilding changes
When a DFS ref update of a NoteDb meta ref fails due to a transient error in the storage backend, we don't want to incur an additional write to the ref during reindexing, as it may just fail again. Worse, while BatchUpdate knows to ignore NoteDb write updates when executing its NoteDbUpdateManager, it can't as easily ignore them while getting its index futures. Thus an error that was successfully ignored is likely to be followed by one that can't be. Work around this for the case of NoteDb writes enabled but reads disabled, by explicitly turning off auto-rebuilding from ChangeIndexer. This doesn't help us in the case of NoteDb reads being enabled, where we have to be able to read the latest NoteDb data from the ref in order to reindex. Change-Id: I64000a57ffcf73a9cbef42a6130e1fb4bc8e98f0
This commit is contained in:
@@ -58,7 +58,7 @@ final class IndexChangesCommand extends SshCommand {
|
||||
for (ChangeResource rsrc : changes.values()) {
|
||||
try {
|
||||
index.apply(rsrc, new Index.Input());
|
||||
} catch (IOException | RestApiException e) {
|
||||
} catch (IOException | RestApiException | OrmException e) {
|
||||
ok = false;
|
||||
writeError("error", String.format(
|
||||
"failed to index change %s: %s", rsrc.getId(), e.getMessage()));
|
||||
|
||||
Reference in New Issue
Block a user