Forcing closure of all read and write transactions prevents from
finishing executing pending code by all threads that are waiting for the
locking mechanism to release.
JIRA: TRNSPRTPCE-727
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: Ia00aed2dd1f77aebaf291afbe077c9de96ae6608
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading Operational Mode Catalog {} , Mode does not exist", omCatalogIid);
throw new RuntimeException("Operational mode not populated in Catalog : " + omCatalogIid + " :" + e);
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading Operational Mode Catalog {} , Mode does not exist", omCatalogIid);
throw new RuntimeException("Operational mode not populated in Catalog : " + omCatalogIid + " :" + e);
- } finally {
- networkTransactionService.close();
}
} else {
// In other cases, means the mode is a non OpenROADM specific Operational Mode
}
} else {
// In other cases, means the mode is a non OpenROADM specific Operational Mode
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading Operational Mode Catalog {} , Mode does not exist", omCatalogIid);
throw new RuntimeException("Operational mode not populated in Catalog : " + omCatalogIid + " :" + e);
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading Operational Mode Catalog {} , Mode does not exist", omCatalogIid);
throw new RuntimeException("Operational mode not populated in Catalog : " + omCatalogIid + " :" + e);
- } finally {
- networkTransactionService.close();
}
}
if (maxRollOff == 0) {
}
}
if (maxRollOff == 0) {
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid + " :" + e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid + " :" + e);
- } finally {
- networkTransactionService.close();
}
} else {
// In other cases, means the mode is a non OpenROADM specific Operational Mode
}
} else {
// In other cases, means the mode is a non OpenROADM specific Operational Mode
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : " + omCatalogIid + " :"
+ e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : " + omCatalogIid + " :"
+ e);
- } finally {
- networkTransactionService.close();
}
}
if (minOOBOsnrSingleChannelValue != null) {
}
}
if (minOOBOsnrSingleChannelValue != null) {
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : " + omCatalogIid + " :"
+ e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : " + omCatalogIid + " :"
+ e);
- } finally {
- networkTransactionService.close();
}
} else {
// In other cases, means the mode is a non OpenROADM specific Operational Mode
}
} else {
// In other cases, means the mode is a non OpenROADM specific Operational Mode
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : " + omCatalogIid + " :"
+ e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : " + omCatalogIid + " :"
+ e);
- } finally {
- networkTransactionService.close();
}
}
if (penaltiesMap == null) {
}
}
if (penaltiesMap == null) {
}
var orAddOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orAddOM);
}
var orAddOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orAddOM);
- networkTransactionService.close();
maxIntroducedCd = orAddOM.getMaxIntroducedCd().doubleValue();
// As per current OpenROADM Spec
//maxIntroducedPdl = orAddOM.getMaxIntroducedPdl().getValue().doubleValue();
maxIntroducedCd = orAddOM.getMaxIntroducedCd().doubleValue();
// As per current OpenROADM Spec
//maxIntroducedPdl = orAddOM.getMaxIntroducedPdl().getValue().doubleValue();
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid + " :" + e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid + " :" + e);
- } finally {
- networkTransactionService.close();
}
var orDropOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orDropOM);
}
var orDropOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orDropOM);
- networkTransactionService.close();
maxIntroducedCd = orDropOM.getMaxIntroducedCd().doubleValue();
// As per current OpenROADM Spec
// maxIntroducedPdl = orDropOM.getMaxIntroducedPdl().getValue().doubleValue();
maxIntroducedCd = orDropOM.getMaxIntroducedCd().doubleValue();
// As per current OpenROADM Spec
// maxIntroducedPdl = orDropOM.getMaxIntroducedPdl().getValue().doubleValue();
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid1 + " :" + e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid1 + " :" + e);
- } finally {
- networkTransactionService.close();
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid2 + " :" + e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid2 + " :" + e);
- } finally {
- networkTransactionService.close();
}
var orAmpOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orAmpOM);
}
var orAmpOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orAmpOM);
- networkTransactionService.close();
maxIntroducedCd = orAmpOM.getMaxIntroducedCd().doubleValue();
// As per current OpenROADM Spec
// maxIntroducedPdl = orAmpOM.getMaxIntroducedPdl().getValue().doubleValue();
maxIntroducedCd = orAmpOM.getMaxIntroducedCd().doubleValue();
// As per current OpenROADM Spec
// maxIntroducedPdl = orAmpOM.getMaxIntroducedPdl().getValue().doubleValue();
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid3 + " :" + e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid3 + " :" + e);
- } finally {
- networkTransactionService.close();
}
var orAddOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orAddOM);
}
var orAddOM = omOptional.get();
LOG.debug("readMdSal: Operational Mode Catalog: omOptional.isPresent = true {}", orAddOM);
- networkTransactionService.close();
var mask = orAddOM.getMaskPowerVsPin();
for (Map.Entry<MaskPowerVsPinKey, MaskPowerVsPin> pw : mask.entrySet()) {
if (spanLoss >= pw.getKey().getLowerBoundary().doubleValue()
var mask = orAddOM.getMaskPowerVsPin();
for (Map.Entry<MaskPowerVsPinKey, MaskPowerVsPin> pw : mask.entrySet()) {
if (spanLoss >= pw.getKey().getLowerBoundary().doubleValue()
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid + " :" + e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid + " :" + e);
- } finally {
- networkTransactionService.close();
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid2 + " :" + e);
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog : "
+ omCatalogIid2 + " :" + e);
- } finally {
- networkTransactionService.close();
LOG.error("Operational Mode catalog is not filled");
return false;
}
LOG.error("Operational Mode catalog is not filled");
return false;
}
- networkTransactionService.close();
return true;
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading Operational Mode Catalog, catalog not filled");
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog not filled" + e);
return true;
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading Operational Mode Catalog, catalog not filled");
throw new RuntimeException(
"readMdSal: Error reading from operational store, Operational Mode Catalog not filled" + e);
- } finally {
- networkTransactionService.close();
"In GnpyTopoImpl : openroadm topology network or openroadm network are not well mounted ...");
}
} catch (InterruptedException | ExecutionException e) {
"In GnpyTopoImpl : openroadm topology network or openroadm network are not well mounted ...");
}
} catch (InterruptedException | ExecutionException e) {
- this.networkTransactionService.close();
throw new GnpyException("In gnpyTopoImpl: error in reading the topology", e);
}
throw new GnpyException("In gnpyTopoImpl: error in reading the topology", e);
}
- this.networkTransactionService.close();
}
private void extractElements(java.util.Optional<Network> openRoadmTopo,
}
private void extractElements(java.util.Optional<Network> openRoadmTopo,
if (nwOptional.isPresent()) {
nw = nwOptional.get();
LOG.debug("readMdSal: network nodes: nwOptional.isPresent = true {}", nw);
if (nwOptional.isPresent()) {
nw = nwOptional.get();
LOG.debug("readMdSal: network nodes: nwOptional.isPresent = true {}", nw);
- networkTransactionService.close();
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading topology {}", nwInstanceIdentifier);
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("readMdSal: Error reading topology {}", nwInstanceIdentifier);
- networkTransactionService.close();
returnStructure.setRC(ResponseCodes.RESPONSE_FAILED);
}
return nw;
returnStructure.setRC(ResponseCodes.RESPONSE_FAILED);
}
return nw;