MNT-22817: Fix flow when unable to retrieve node's metadata

This commit is contained in:
Nicolas Barithel
2022-03-04 11:21:12 +00:00
committed by Vitor Moreira
parent 70ae436254
commit 9c4ddc2e52
@@ -1720,7 +1720,11 @@ public class SolrInformationServer implements InformationServer
Optional<Collection<NodeMetaData>> nodeMetaDatas = getNodesMetaDataFromRepository(nmdp);
if (nodeMetaDatas.isEmpty() || nodeMetaDatas.get().isEmpty()) return;
if (nodeMetaDatas.isEmpty() || nodeMetaDatas.get().isEmpty())
{
// Using exception for flow handling to jump to error node processing.
throw new Exception("Error loading node metadata from repository.");
}
NodeMetaData nodeMetaData = nodeMetaDatas.get().iterator().next();
if (node.getTxnId() == Long.MAX_VALUE)