From 7c7b8183790456f9ac83489485122a49057c99db Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 9 Dec 2014 18:01:10 +0100 Subject: [PATCH] BUG-2470: add trace of failed modification With this change, the InMemoryDOMDataStore trace logs should contain the dump of failed modifications. Change-Id: Iea3038169090a574030c5e03cf155089faa6e985 Signed-off-by: Robert Varga --- .../md/sal/dom/store/impl/InMemoryDOMDataStore.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java index 4e01fa98e4..85134f1fd4 100644 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java +++ b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDOMDataStore.java @@ -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); -- 2.36.6