bereng commented on code in PR #1891:
URL: https://github.com/apache/cassandra/pull/1891#discussion_r1121381670
##########
src/java/org/apache/cassandra/db/DeletionTime.java:
##########
@@ -38,17 +41,31 @@ public class DeletionTime implements
Comparable<DeletionTime>, IMeasurableMemory
/**
* A special DeletionTime that signifies that there is no top-level (row)
tombstone.
*/
- public static final DeletionTime LIVE = new DeletionTime(Long.MIN_VALUE,
Integer.MAX_VALUE);
+ public static final DeletionTime LIVE = new DeletionTime(Long.MIN_VALUE,
Long.MAX_VALUE);
public static final Serializer serializer = new Serializer();
+ public static final Serializer legacySerializer = new LegacySerializer();
private final long markedForDeleteAt;
- private final int localDeletionTime;
+ protected final int localDeletionTimeGuavaUint;
+
+ public static DeletionTime getInstance(long markedForDeleteAt, long
localDeletionTime)
Review Comment:
Done
##########
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:
Done
--
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]