Skip to content

Commit

Permalink
IGNITE-22080 Fix ConflictResolver fails on debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
timoninmaxim committed Apr 19, 2024
1 parent e8ebaf2 commit 107b38b
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public DebugCacheVersionConflictResolverImpl(byte clusterId, String conflictReso
Object newVal = conflictResolveFieldEnabled ? newEntry.value(ctx) : null;

if (oldVal != null)
oldVal = value(oldVal);
oldVal = debugValue(oldVal);

if (newVal != null)
newVal = value(newVal);
newVal = debugValue(newVal);

log.debug("isUseNew[" +
"start=" + oldEntry.isStartVersion() +
Expand All @@ -63,6 +63,16 @@ public DebugCacheVersionConflictResolverImpl(byte clusterId, String conflictReso
return res;
}

/** @return Conflict resolve field value, or specified {@code val} if the field not found. */
private Object debugValue(Object val) {
try {
return super.value(val);
}
catch (Exception e) {
return val;
}
}

/** {@inheritDoc} */
@Override public String toString() {
return S.toString(CacheVersionConflictResolverImpl.class, this);
Expand Down

0 comments on commit 107b38b

Please sign in to comment.