if (repositoryInfoEntry != null) {
Document repoInfoDoc = repositoryInfoEntry.getContent();
// we should only remove the repository info if it wasn't initialized successfully previously
// in a cluster, it may happen that another node finished initialization while this node crashed (in which case we
// should not remove the entry)
if (!repoInfoDoc.containsField(REPOSITORY_INITIALIZED_AT_FIELD_NAME)) {
this.documentStore.localStore().remove(REPOSITORY_INFO_KEY);
}
}
} finally {
// if we have a global cluster-wide lock, make sure its released