}
private IdLocalPool getOrCreateLocalIdPool(String parentPoolName, String localPoolName)
- throws IdManagerException, ReadFailedException {
+ throws IdManagerException {
IdLocalPool localIdPool = localPool.get(parentPoolName);
if (localIdPool == null) {
idUtils.lock(lockManager, parentPoolName);
try {
// Check if a previous thread that got the cluster-wide lock
// first, has created the localPool
- InstanceIdentifier<IdPool> childIdPoolInstanceIdentifier = idUtils
- .getIdPoolInstance(localPoolName);
- Optional<IdPool> childIdPoolOpt = singleTxDB.syncReadOptional(LogicalDatastoreType.CONFIGURATION,
- childIdPoolInstanceIdentifier);
- if (childIdPoolOpt.isPresent()) {
- updateLocalIdPoolCache(childIdPoolOpt.get(), parentPoolName);
+ try {
+ InstanceIdentifier<IdPool> childIdPoolInstanceIdentifier = idUtils
+ .getIdPoolInstance(localPoolName);
+ Optional<IdPool> childIdPoolOpt = singleTxDB.syncReadOptional(LogicalDatastoreType.CONFIGURATION,
+ childIdPoolInstanceIdentifier);
+ if (childIdPoolOpt.isPresent()) {
+ updateLocalIdPoolCache(childIdPoolOpt.get(), parentPoolName);
+ }
+ }
+ catch (ReadFailedException ex) {
+ LOG.debug("Failed to read id pool {} due to {}", localPoolName, ex.getMessage());
}
if (localPool.get(parentPoolName) == null) {
try {