summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
956797b)
This stage can get stuck aswell and if the submit is never timed out
from the backend as a result of a bug it will never complete.
Change-Id: Ia424d009cd201e3f03a13af88c35b1390b40cbee
Signed-off-by: Tomas Cere <tcere@cisco.com>
// write only the top list
tx.merge(LogicalDatastoreType.CONFIGURATION, ID_INTS_YID, containerNode);
try {
// write only the top list
tx.merge(LogicalDatastoreType.CONFIGURATION, ID_INTS_YID, containerNode);
try {
- tx.submit().checkedGet();
+ tx.submit().checkedGet(125, TimeUnit.SECONDS);
} catch (final OptimisticLockFailedException e) {
// when multiple write-transactions are executed concurrently we need to ignore this.
// If we get optimistic lock here it means id-ints already exists and we can continue.
LOG.debug("Got an optimistic lock when writing initial top level list element.", e);
} catch (final OptimisticLockFailedException e) {
// when multiple write-transactions are executed concurrently we need to ignore this.
// If we get optimistic lock here it means id-ints already exists and we can continue.
LOG.debug("Got an optimistic lock when writing initial top level list element.", e);
- } catch (final TransactionCommitFailedException e) {
+ } catch (final TransactionCommitFailedException | TimeoutException e) {
LOG.warn("Unable to ensure IdInts list for id: {} exists.", id, e);
settableFuture.set(RpcResultBuilder.<WriteTransactionsOutput>failed()
.withError(RpcError.ErrorType.APPLICATION, "Unexpected-exception", e).build());
LOG.warn("Unable to ensure IdInts list for id: {} exists.", id, e);
settableFuture.set(RpcResultBuilder.<WriteTransactionsOutput>failed()
.withError(RpcError.ErrorType.APPLICATION, "Unexpected-exception", e).build());
tx.merge(LogicalDatastoreType.CONFIGURATION, idListWithKey, entry);
try {
tx.merge(LogicalDatastoreType.CONFIGURATION, idListWithKey, entry);
try {
- tx.submit().checkedGet();
- } catch (final TransactionCommitFailedException e) {
+ tx.submit().checkedGet(125, TimeUnit.SECONDS);
+ } catch (final TransactionCommitFailedException | TimeoutException e) {
LOG.warn("Unable to ensure IdInts list for id: {} exists.", id, e);
settableFuture.set(RpcResultBuilder.<WriteTransactionsOutput>failed()
.withError(RpcError.ErrorType.APPLICATION, "Unexpected-exception", e).build());
LOG.warn("Unable to ensure IdInts list for id: {} exists.", id, e);
settableFuture.set(RpcResultBuilder.<WriteTransactionsOutput>failed()
.withError(RpcError.ErrorType.APPLICATION, "Unexpected-exception", e).build());