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


##########
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)
+        {
+            // We're calling the super constructor with int ldt to force 
invalid values through
+            // and workaround any validation
+            super(markedForDeleteAt, localDeletionTime);
+        }
+
+        public long localDeletionTime()

Review Comment:
   Nit: add `@Override`



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