adelapena commented on code in PR #1891:
URL: https://github.com/apache/cassandra/pull/1891#discussion_r1120162113


##########
src/java/org/apache/cassandra/db/DeletionTime.java:
##########
@@ -187,8 +244,29 @@ public void skip(DataInputPlus in) throws IOException
 
         public long serializedSize(DeletionTime delTime)
         {
-            return TypeSizes.sizeof(delTime.localDeletionTime())
-                 + TypeSizes.sizeof(delTime.markedForDeleteAt());
+            return TypeSizes.sizeof(Integer.MAX_VALUE)
+                   + TypeSizes.sizeof(delTime.markedForDeleteAt());
+        }
+    }
+
+    // When scrubbing legacy sstables (overflown) or upon sstable corruption 
we could have negative ldts
+    public static class InvalidDeletionTime extends DeletionTime
+    {
+        public InvalidDeletionTime(long markedForDeleteAt, int 
localDeletionTime)

Review Comment:
   We should probably make the constructor `private`, since this is meant to be 
called only by `DeletionTime.getInstance`.



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