blambov commented on code in PR #2464:
URL: https://github.com/apache/cassandra/pull/2464#discussion_r1274415905
##########
src/java/org/apache/cassandra/db/DeletionTime.java:
##########
@@ -221,7 +222,11 @@ public DeletionTime deserialize(DataInputPlus in) throws
IOException
{
int flags = in.readByte();
if ((flags & IS_LIVE_DELETION) != 0)
+ {
+ if ((flags & 0xFF) != IS_LIVE_DELETION)
+ throw new CorruptSSTableException(new Exception("Corrupted
sstable. Invalid flags found deserializing DeletionTime"), "");
Review Comment:
Code as low level as this should not throw `CorruptSSTableException`. Make
it an `AssertionError` or `IOException`, so that the calling code can catch it,
add the sstable name to the exception, and, most importantly, mark it as
corrupt.
--
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]