ibessonov commented on code in PR #6761:
URL: https://github.com/apache/ignite-3/pull/6761#discussion_r2428251977


##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageCompactionTrigger.java:
##########
@@ -306,9 +306,7 @@ private void onCompactionRevisionUpdateBusy(long 
compactionRevision) {
                 .thenRunAsync(() -> storage.compact(compactionRevision), 
compactionExecutor)
                 .whenComplete((unused, throwable) -> {
                     if (throwable != null) {
-                        Throwable cause = unwrapCause(throwable);
-
-                        if (!(cause instanceof NodeStoppingException)) {
+                        if (!hasCause(throwable, NodeStoppingException.class, 
RejectedExecutionException.class)) {

Review Comment:
   I wonder if we could prevent these exceptions instead of handling them. We 
have busy locks for this exact reason. Could you please use them instead?



##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageCompactionTrigger.java:
##########
@@ -306,9 +306,7 @@ private void onCompactionRevisionUpdateBusy(long 
compactionRevision) {
                 .thenRunAsync(() -> storage.compact(compactionRevision), 
compactionExecutor)
                 .whenComplete((unused, throwable) -> {
                     if (throwable != null) {
-                        Throwable cause = unwrapCause(throwable);
-
-                        if (!(cause instanceof NodeStoppingException)) {
+                        if (!hasCause(throwable, NodeStoppingException.class, 
RejectedExecutionException.class)) {

Review Comment:
   Also, it would be nice to get rid of a copy-pasted code here, since we're 
fixing it anyway.



-- 
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]

Reply via email to