If some exception occures during transaction submiting it is
logged (until now it was silently ignored).
Change-Id: I576572949259e9dd41be3efd6bd6a0a0a07955ee
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
LOG.trace("nothing to commit - submit returns true");
return true;
}
- wTx.submit();
+ final CheckedFuture<Void, TransactionCommitFailedException> submitFuture = wTx.submit();
+ Futures.addCallback(submitFuture, new FutureCallback<Void>() {
+ @Override
+ public void onSuccess(Void result) {
+ //no action required
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ if (t instanceof TransactionCommitFailedException) {
+ LOG.error("Transaction commit failed. {}", t);
+ } else {
+ LOG.error("Exception during transaction submitting. {}", t);
+ }
+ }
+ });
wTx = null;
}
return true;