Jackie-Jiang commented on code in PR #18492:
URL: https://github.com/apache/pinot/pull/18492#discussion_r3238043607


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/provider/TableDataManagerProvider.java:
##########
@@ -55,15 +55,34 @@ TableDataManager getTableDataManager(TableConfig 
tableConfig,
       @Nullable ExecutorService segmentPreloadExecutor,
       @Nullable Cache<Pair<String, String>, SegmentErrorInfo> errorCache,
       BooleanSupplier isServerReadyToServeQueries,
+      BooleanSupplier isIngestionPausedDueToStartUp,
       boolean enableAsyncSegmentRefresh,
       ServerReloadJobStatusCache reloadJobStatusCache);
 
+  /**
+   * Backward-compatible overload that does not gate ingestion at startup. 
Delegates to the full overload with
+   * {@code isIngestionPausedDueToStartUp = () -> false}.
+   */
+  default TableDataManager getTableDataManager(TableConfig tableConfig,

Review Comment:
   Directly modify the main constructor. This is an internal only interface, no 
need to keep backward compatibility



##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/provider/DefaultTableDataManagerProvider.java:
##########
@@ -75,8 +75,8 @@ public TableDataManager getTableDataManager(TableConfig 
tableConfig, Schema sche
       SegmentReloadSemaphore segmentReloadSemaphore, ExecutorService 
segmentReloadRefreshExecutor,
       @Nullable ExecutorService segmentPreloadExecutor,
       @Nullable Cache<Pair<String, String>, SegmentErrorInfo> errorCache,
-      BooleanSupplier isServerReadyToServeQueries, boolean 
enableAsyncSegmentRefresh,
-      ServerReloadJobStatusCache reloadJobStatusCache) {
+      BooleanSupplier isServerReadyToServeQueries, BooleanSupplier 
isIngestionPausedDueToStartUp,

Review Comment:
   I'd model it to be more general: `isServerReadyToConsumeData`. It also 
aligns with `_isTableReadyToConsumeData`.
   Put it before `isServerReadyToServeQueries` because it is a step before 
serving queries



##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java:
##########
@@ -138,6 +138,7 @@ public class RealtimeTableDataManager extends 
BaseTableDataManager {
   protected Cache<String, StreamMetadataProvider> _streamMetadataProviderCache;
 
   private final BooleanSupplier _isServerReadyToServeQueries;
+  private final BooleanSupplier _isIngestionPausedDueToStartUp;

Review Comment:
   (minor) Put it above ready to serve queries to follow the logical sequence. 
Same for other places



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