adelapena commented on code in PR #1891:
URL: https://github.com/apache/cassandra/pull/1891#discussion_r1106960348
##########
src/java/org/apache/cassandra/db/DeletionTime.java:
##########
@@ -38,14 +41,15 @@ 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;
+ private final long localDeletionTime;
Review Comment:
Yep, the problem with `DeletionTime#validate` can be addressed with a class
extending `DeletionTime`, probably `InvalidDeletionTime`, or
`OverflownDeletionTime`. There could be a factory method such as:
```java
public static DeletionTime DeletionTime(long markedForDeleteAt, long
localDeletionTime)
{
return localDeletionTime >= 0
? new DeletionTime(markedForDeleteAt, localDeletionTime)
: new OverflownDeletionTime(markedForDeleteAt, localDeletionTime);
}
```
Then `DeletionTime` and `InvalidDeletionTime` can have implementations of
`validate()` that just return `true` or `false`.
--
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]