Add Assertions on CS Application in Snapshot Logic (#58681) (#59511)

Relates to #58680. Bugs like that should not only show up in logs
but ideally also get caught in tests. We expect to never see exceptions
in these two spots.
This commit is contained in:
Armin Braun 2020-07-14 12:16:42 +02:00 committed by GitHub
parent 81e96954d0
commit 0e3d87ab54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -355,6 +355,7 @@ public class RepositoriesService extends AbstractLifecycleComponent implements C
}
repositories = Collections.unmodifiableMap(builder);
} catch (Exception ex) {
assert false : new AssertionError(ex);
logger.warn("failure updating cluster state ", ex);
}
}

View File

@ -137,6 +137,7 @@ public class SnapshotShardsService extends AbstractLifecycleComponent implements
}
} catch (Exception e) {
assert false : new AssertionError(e);
logger.warn("Failed to update snapshot state ", e);
}
}