deemoliu commented on code in PR #10047: URL: https://github.com/apache/pinot/pull/10047#discussion_r1190181375
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/immutable/ImmutableSegmentImpl.java: ########## @@ -159,7 +159,11 @@ public void deleteValidDocIdsSnapshot() { } } - private File getValidDocIdsSnapshotFile() { + private File getValidDocIdsSnapshotFile(boolean isTTLEnabled) { + if (isTTLEnabled) { + return new File(SegmentDirectoryPaths.findSegmentDirectory(_segmentMetadata.getIndexDir()), Review Comment: thanks @KKcorps The reason to have a separate file is that We should mark snapshot persisted by TTL differently from the regular snapshot, so validDocsIdsSnapshot from upsertTTL will not be override by SnapshotEnabled feature. We can also use snapshot for segment compaction and other upsert improvements. Another potential solution is disable `enableSnapshot` for upsert TTL so that both snapshots won't overwrite each other. ########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java: ########## @@ -73,13 +75,15 @@ public abstract class BasePartitionUpsertMetadataManager implements PartitionUps protected BasePartitionUpsertMetadataManager(String tableNameWithType, int partitionId, List<String> primaryKeyColumns, List<String> comparisonColumns, HashFunction hashFunction, - @Nullable PartialUpsertHandler partialUpsertHandler, boolean enableSnapshot, ServerMetrics serverMetrics) { + @Nullable PartialUpsertHandler partialUpsertHandler, @Nullable UpsertTTLConfig upsertTTLConfig, Review Comment: @KKcorps sure, will do in another PR. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org