summaryrefslogtreecommitdiffstats
path: root/infra/data-impl/src/main/java/io/fd/honeycomb
diff options
context:
space:
mode:
Diffstat (limited to 'infra/data-impl/src/main/java/io/fd/honeycomb')
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java5
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java
index 3de9131c0..f4989aa37 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeDelegator.java
@@ -146,13 +146,14 @@ public final class ModifiableDataTreeDelegator extends ModifiableDataTreeManager
LOG.info("Changes successfully reverted");
} catch (WriterRegistry.Reverter.RevertFailedException revertFailedException) {
// fail with failed revert
- LOG.error("Failed to revert successful changes", revertFailedException);
+ LOG.error("Failed to revert successful(comitted) changes, failure occurred for: {}. State might be corrupted.",
+ revertFailedException.getFailedUpdate(), revertFailedException);
throw revertFailedException;
}
// fail with success revert
// not passing the cause,its logged above and it would be logged after transaction
// ended again(prevent double logging of same error
- throw new WriterRegistry.Reverter.RevertSuccessException(e.getFailedIds());
+ throw new WriterRegistry.Reverter.RevertSuccessException(e.getUnrevertedSubtrees());
} catch (TransactionCommitFailedException e) {
// TODO HONEYCOMB-162 revert should probably occur when context is not written successfully
final String msg = "Error while updating mapping context data";
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java
index 723bb88ad..f999ba1ee 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModificationDiff.java
@@ -246,7 +246,7 @@ final class ModificationDiff {
final com.google.common.base.Optional<NormalizedNode<?, ?>> afterData =
modification.getDataAfter();
checkArgument(beforeData.isPresent() || afterData.isPresent(),
- "Both before and after data are null for $s", modification.getId());
+ "Both before and after data are null for %s", modification.getId());
return NormalizedNodeUpdate.create(modification.getId(), beforeData.orNull(), afterData.orNull());
}