Merge "BUG-2470: add trace of failed modification"
authorTony Tkacik <ttkacik@cisco.com>
Wed, 10 Dec 2014 15:35:38 +0000 (15:35 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 10 Dec 2014 15:35:38 +0000 (15:35 +0000)
opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java

index 4e01fa98e4be2ab2692ac58fa0e14fe7f3fcffcb..85134f1fd499fef5f884c239e9c05f4d99004701 100644 (file)
@@ -241,6 +241,11 @@ public class InMemoryDOMDataStore extends TransactionReadyPrototype implements D
                 LOG.warn("Store Tx: {} Data Precondition failed for {}.", transaction.getIdentifier(),
                         e.getPath(), e);
                 transaction.warnDebugContext(LOG);
+
+                // For debugging purposes, allow dumping of the modification. Coupled with the above
+                // precondition log, it should allow us to understand what went on.
+                LOG.trace("Store Tx: {} modifications: {}", modification);
+
                 return Futures.immediateFailedFuture(new TransactionCommitFailedException("Data did not pass validation.", e));
             } catch (Exception e) {
                 LOG.warn("Unexpected failure in validation phase", e);