smiklosovic commented on code in PR #3374:
URL: https://github.com/apache/cassandra/pull/3374#discussion_r1874397423
##########
src/java/org/apache/cassandra/service/CassandraDaemon.java:
##########
@@ -291,7 +300,7 @@ protected void setup()
{
SystemKeyspace.snapshotOnVersionChange();
}
- catch (IOException e)
+ catch (Throwable e)
Review Comment:
because what it internally does is that it takes a snapshot and
`executeTask` in snapshot manager will ultimately throw `SnapshotException`
which is `RuntimeException`, not `IOException`. I do not want `SnapshotManager`
to throw checked exceptions, except cases when we moved the snapshotting
methods from `StorageService(MBean)` to `SnapshotManagerMBean` as we need to
still honor that contract for whoever is using it externally.
`IOException` was caught here because `snapshotOnVersionChange` was throwing
it while snapshotting. We may catch `SnapshotException` here instead
`Throwable` but I like this more, it is actually safer, because whatever
happens in `snapshotOnVersionChange` will be evaluated as errorneous. I do know
under what circumstance we would be OK with a node throwing exception in that
method and we would act like nothing wrong happened and just carried on.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]