KKcorps commented on code in PR #10047:
URL: https://github.com/apache/pinot/pull/10047#discussion_r1189400896
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/ConcurrentMapPartitionUpsertMetadataManager.java:
##########
@@ -181,6 +198,55 @@ protected void removeSegment(IndexSegment segment,
MutableRoaringBitmap validDoc
}
}
+ /**
+ * When TTL is enabled for upsert, this function is used to remove expired
keys from the primary key indexes.
+ *
+ * When committing consuming segment, we replace the consuming segment with
an immutable segments.
+ * After replaceSegment, we iterate over recordInfoIterator to find
validDocIds that are expired (out-of-TTL).
+ * Primarykey expired when the comparison time value of the record is less
or equal to (segmentEndTime - TTL).
+ *
+ * @param expiredTimestamp segmentEndTime - TTLTime (converted ttl time
values in millis time unit)
+ * @return void
+ */
+ @Override
+ public void doRemoveExpiredPrimaryKeys(Comparable expiredTimestamp) {
Review Comment:
Yes, plus now we have support for multiple comparison columns as well. We
can enforce a requirement for now that if TTL is enabled only one comparison
column can be there and it needs to be timestamp.
--
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]