commit | b44a74b5011e539298fca41b7a12023650386982 | [log] [tgz] |
---|---|---|
author | Marcin Czech <maczech@gmail.com> | Fri Feb 14 11:47:19 2020 +0100 |
committer | Marcin Czech <maczech@gmail.com> | Fri Feb 14 11:51:01 2020 +0100 |
tree | ede7ba4c4fb35d02904edddf4efdf7cbcfe7fd95 | |
parent | 6fe7efd0c1c054ec5772c84a5495a7a849b57f91 [diff] |
Improve logging when catching a zookeeper error Feature: Issue 12098 Change-Id: I9e01bb30cff2d19f0b48be07f310c51a63950b0c
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/RefUpdateValidator.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/RefUpdateValidator.java index 82d4ff0..e66b3ba 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/RefUpdateValidator.java +++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/validation/RefUpdateValidator.java
@@ -146,6 +146,11 @@ try { succeeded = sharedRefDb.compareAndPut(projectName, refPair.compareRef, refPair.putValue); } catch (IOException e) { + logger.atWarning().withCause(e).log( + "Not able to persist the data in Zookeeper for project '{}' and ref '{}', message: {}", + projectName, + refPair.getName(), + e.getMessage()); throw new SharedDbSplitBrainException(errorMessage, e); }