- Optional<ConfigSnapshotHolder> configSnapshotHolderOptional = persisterWithConfiguration.storage.loadLastConfig();
- if (configSnapshotHolderOptional.isPresent()) {
- return configSnapshotHolderOptional;
+ List<ConfigSnapshotHolder> configs = null;
+ try {
+ configs = persisterWithConfiguration.storage.loadLastConfigs();
+ } catch (IOException e) {
+ throw new RuntimeException("Error while calling loadLastConfig on " + persisterWithConfiguration, e);
+ }
+ if (configs.isEmpty() == false) {
+ logger.debug("Found non empty configs using {}:{}", persisterWithConfiguration, configs);
+ return configs;