ibessonov commented on code in PR #5653:
URL: https://github.com/apache/ignite-3/pull/5653#discussion_r2052311850
##########
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureManager.java:
##########
@@ -160,14 +158,14 @@ private synchronized boolean process(FailureContext
failureCtx, FailureHandler h
return false;
}
- var exceptionForLogging = new
StackTraceCapturingException(failureCtx.error());
+ var exceptionForLogging = new
StackTraceCapturingException(failureCtx.message(), failureCtx.error());
if (handler.ignoredFailureTypes().contains(failureCtx.type())) {
LOG.warn(IGNORED_FAILURE_LOG_MSG, exceptionForLogging, handler,
failureCtx.type());
} else {
LOG.error(FAILURE_LOG_MSG, exceptionForLogging, handler,
failureCtx.type());
}
- if (reserveBuf != null && hasCauseOrSuppressed(failureCtx.error(),
OutOfMemoryError.class)) {
+ if (reserveBuf != null && failureCtx.error() != null &&
hasCauseOrSuppressed(failureCtx.error(), OutOfMemoryError.class)) {
Review Comment:
What if `hasCauseOrSuppressed` would just return `false` if we pass null
into it?
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/WatchProcessor.java:
##########
@@ -221,15 +221,15 @@ public CompletableFuture<Void> notifyWatches(long
newRevision, List<Entry> updat
* @return Updated value of {@link #notificationFuture}.
*/
@VisibleForTesting
- CompletableFuture<Void> enqueue(Supplier<CompletableFuture<Void>>
asyncAction) {
+ CompletableFuture<Void> enqueue(Supplier<CompletableFuture<Void>>
asyncAction, String additionalInfo) {
Review Comment:
I see. Can we please convert the second parameter into a supplier, so that
we don't calculate these long strings every time?
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/WatchProcessor.java:
##########
@@ -266,7 +266,14 @@ private CompletableFuture<Void> notifyWatchesInternal(long
newRevision, List<Ent
newNotificationFuture.whenComplete((unused, e) ->
maybeLogLongProcessing(filteredUpdatedEntries, startTimeNanos));
return newNotificationFuture;
- });
+ }, updatedEntriesKeysInfo(updatedEntries));
+ }
+
+ private static String updatedEntriesKeysInfo(List<Entry> updatedEntries) {
+ String joinedKeys = updatedEntries.stream()
+ .map(entry -> new String(entry.key(), UTF_8))
+ .collect(joining(","));
+ return "Keys of updated entries: " + joinedKeys;
Review Comment:
`"Keys of updated entries: "` can be passed directly into `joining` as a
prefix value
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]