xiangfu0 commented on code in PR #19832:
URL: https://github.com/apache/pinot/pull/19832#discussion_r4293095993


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -1214,14 +1260,23 @@ protected File getWatermarkFile() {
     return new File(_tableIndexDir, V1Constants.TTL_WATERMARK_TABLE_PARTITION 
+ _partitionId);
   }
 
+  /// Returns the TTL watermark last persisted to disk, as computed by 
getWatermarkToPersist(). The validDocIds
+  /// snapshots on disk are up to date for all the segments out of TTL against 
it, while they can be stale for the
+  /// segments out of TTL only against the watermark in memory.
+  protected double getPersistedWatermark() {

Review Comment:
   Nice — exposing a `protected` getter while keeping `_persistedWatermark` 
private is cleaner than widening the field. Volatile read is thread-safe and 
the doc comment accurately describes the semantics.



-- 
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]

Reply via email to