blambov commented on code in PR #2508:
URL: https://github.com/apache/cassandra/pull/2508#discussion_r1273405173
##########
src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java:
##########
@@ -138,7 +138,7 @@ public boolean hasNext()
{
return iterator.hasNext();
}
- catch (IndexOutOfBoundsException | VIntOutOfRangeException e)
+ catch (IndexOutOfBoundsException | VIntOutOfRangeException |
AssertionError e)
Review Comment:
Lower level code cannot throw `CorruptSSTableException`, as it is a
much-higher-level concept. Assertions are just one type of indication of
unexpected data in the code (index out of bounds being another). The
alternative to this is to go and change all data parsing to catch potential
errors and translate them to `IOException`, which is not very feasible, and may
be a problem if a piece of code can be used in other paths that don't involve
reading from disk.
--
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]