nitsanw commented on code in PR #4402:
URL: https://github.com/apache/cassandra/pull/4402#discussion_r2428963912


##########
src/java/org/apache/cassandra/db/compaction/CompactionTask.java:
##########
@@ -287,16 +294,28 @@ public boolean apply(SSTableReader sstable)
                     timeSpentWritingKeys = 
TimeUnit.NANOSECONDS.toMillis(nanoTime() - start);
 
                     // point of no return
-                    newSStables = writer.finish();
+                    newSStables = finish(ci);
+                }
+                catch (Exception e)
+                {
+                    if (e instanceof IOException)
+                        throw (IOException) e;
+                    else if (e instanceof CompactionInterruptedException)
+                        throw (CompactionInterruptedException) e;
+                    else
+                        throw new IllegalStateException(e);

Review Comment:
   Defensively checking for incorrect exception types



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

Reply via email to