maedhroz commented on code in PR #2051:
URL: https://github.com/apache/cassandra/pull/2051#discussion_r1051784645
##########
src/java/org/apache/cassandra/db/Memtable.java:
##########
@@ -387,9 +397,16 @@ public Partition getPartition(DecoratedKey key)
return partitions.get(key);
}
+ /**
+ * Returns the minTS if one available, otherwise -1.
+ *
+ * EncodingStats uses a synthetic epoch TS at 2015. We don't want to leak
that (CASSANDRA-18118) so we return -1 instead.
+ *
+ * @return The minTS or -1 if none available
+ */
public long getMinTimestamp()
{
- return minTimestamp;
+ return minTimestamp != EncodingStats.NO_STATS.minTimestamp ?
minTimestamp : -1;
Review Comment:
@bereng Looks like the general form of the solution is not to treat
`EncodingStats.NO_STATS.minTimestamp` like a real timestamp in
`CompactionController`. Any reason not to just leave `getMinTimestamp()` alone
and check `EncodingStats.NO_STATS.minTimestamp` or
`EncodingStats.TIMESTAMP_EPOCH` there instead?
--
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]