klsince commented on code in PR #12451:
URL: https://github.com/apache/pinot/pull/12451#discussion_r1498426332


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -102,6 +117,12 @@ public abstract class BasePartitionUpsertMetadataManager 
implements PartitionUps
   // Initialize with 1 pending operation to indicate the metadata manager can 
take more operations
   private int _numPendingOperations = 1;
   private boolean _closed;
+  // The lock and boolean flag below ensure only one thread can start 
preloading and preloading happens only once.
+  private final Lock _preloadLock = new ReentrantLock();
+  private volatile boolean _isPreloaded = false;

Review Comment:
   simplified, by setting _isPreloading to true if preloading is enabled, 
otherwise 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: 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

Reply via email to