BUG 8494 log possibly hanged futures in tx handlers
[controller.git] / opendaylight / md-sal / samples / clustering-test-app / provider / src / main / java / org / opendaylight / controller / clustering / it / provider / impl / ProduceTransactionsHandler.java
index 01be4645bccb62e719b745a80e4d5ef3e41de564..cfd59a52511264cf8d22a37c36abf1599abb0951 100644 (file)
@@ -208,6 +208,13 @@ public class ProduceTransactionsHandler implements Runnable {
                 completionFuture.set(RpcResultBuilder.<ProduceTransactionsOutput>failed()
                         .withError(RpcError.ErrorType.APPLICATION, "Unexpected-exception", exception).build());
 
+                for (int i = 0; i < futures.size(); i++) {
+                    final CheckedFuture<Void, TransactionCommitFailedException> future = futures.get(i);
+                    if (!future.isDone()) {
+                        LOG.warn("Future #{}/{} possibly hanged.", future, futures.size());
+                    }
+                }
+
                 executor.shutdown();
             } finally {
                 try {