aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/netconfnode-state-service
diff options
context:
space:
mode:
authorherbert <herbert.eiselt@highstreet-technologies.com>2020-05-18 16:07:04 +0200
committerherbert <herbert.eiselt@highstreet-technologies.com>2020-05-18 16:07:32 +0200
commitfa93e2c6ad94861460a0d14a447af01d4379b0a2 (patch)
tree0bba403cf94f06e470b21a624979761c8f25d859 /sdnr/wt/netconfnode-state-service
parent752248349615d55473dcfdd9f4b141e8706716fa (diff)
Fix Cluster AkaTimeoutException
Issue-ID: SDNC-1191 Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com> Change-Id: I7a85d66778f6b278d960257d4d8664ec8605253e
Diffstat (limited to 'sdnr/wt/netconfnode-state-service')
-rw-r--r--sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java
index 93f230a23..6a811ea59 100644
--- a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java
+++ b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java
@@ -92,7 +92,7 @@ public final class GenericTransactionUtils implements TransactionUtils {
int retry = 0;
int retryDelayMilliseconds = 2000;
- int maxRetries = 5; // 0 no Retry
+ int maxRetries = 0; // 0 no Retry
do {
if (retry > 0) {
@@ -107,8 +107,8 @@ public final class GenericTransactionUtils implements TransactionUtils {
LOG.debug("Sending message with retry {} ", retry);
statusIndicator.set("Create Read Transaction");
-
- try (ReadTransaction readTransaction = dataBroker.newReadOnlyTransaction();) {
+ ReadTransaction readTransaction = dataBroker.newReadOnlyTransaction();
+ try {
@NonNull FluentFuture<Optional<T>> od = readTransaction.read(dataStoreType, iid);
statusIndicator.set("Read done");
if (od != null) {
@@ -119,19 +119,24 @@ public final class GenericTransactionUtils implements TransactionUtils {
data = optionalData.orElse(null);
statusIndicator.set("Read transaction done");
noErrorIndication.set(true);
+ } else {
+ statusIndicator.set("optional Data is null");
}
+ } else {
+ statusIndicator.set("od feature is null");
}
-
- readTransaction.close();
} catch (CancellationException | ExecutionException | InterruptedException | NoSuchElementException e) {
statusIndicator.set(StackTrace.toString(e));
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
+ LOG.debug("Exception during read", e);
}
} while (noErrorIndication.get() == false && retry++ < maxRetries);
+ LOG.debug("stage 2 noErrorIndication {} status text {}", noErrorIndication.get(), statusIndicator.get());
+
return data;
}