shishkovilja commented on code in PR #10328:
URL: https://github.com/apache/ignite/pull/10328#discussion_r1165543174
##########
modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/cache/IdleVerify.java:
##########
@@ -341,6 +343,15 @@ private void cacheIdleVerifyV2(
if (F.isEmpty(res.exceptions()))
return;
+ Optional<Exception> inactiveE = res.exceptions().values()
+ .stream()
+ .filter(e -> X.hasCause(e,
VerifyBackupPartitionsTaskV2.IDLE_VERIFY_ON_INACTIVE_CLUSTER_ERROR_MESSAGE,
+ IgniteException.class))
+ .findFirst();
+
+ if (inactiveE.isPresent())
+ throw new IllegalStateException(inactiveE.get().getMessage());
Review Comment:
@J-Bakuli , I think we should decide here, what should be treated as illegal
state. As I understand, @alex-plekhanov asks: why we raise runtime exception
only for `inactiveE` and does not for other ones.
IMHO, first of all, we should create a detailed dump in a txt file (in case
of exceptions), and then raise `IllegalStateException` (if any of the
exceptions was found). Otherwise, we may get in a situation where all other
exceptions will be ignored without any mention of them.
--
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]