KKcorps commented on code in PR #15296: URL: https://github.com/apache/pinot/pull/15296#discussion_r2011357076
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java: ########## @@ -1066,7 +1067,7 @@ protected SegmentBuildDescriptor buildSegmentInternal(boolean forCommit) { // for partial upsert tables, do not release _partitionGroupConsumerSemaphore proactively and rely on offload() // to release the semaphore. This ensures new consuming segment is not consuming until the segment replacement is // complete. - if (_allowConsumptionDuringCommit) { + if (_allowConsumptionDuringBuild) { Review Comment: too many flags look unclean imo let's see if we can change it to an enum or something similar ``` private enum ConsumptionPolicy { ALLOW_ALWAYS, // Allow during both build and download ALLOW_DURING_BUILD_ONLY, // Allow during build but not download ALLOW_DURING_DOWNLOAD_ONLY, // Allow during download but not build DISALLOW_ALWAYS // Don't allow during either phase } ``1 ########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java: ########## @@ -1066,7 +1067,7 @@ protected SegmentBuildDescriptor buildSegmentInternal(boolean forCommit) { // for partial upsert tables, do not release _partitionGroupConsumerSemaphore proactively and rely on offload() // to release the semaphore. This ensures new consuming segment is not consuming until the segment replacement is // complete. - if (_allowConsumptionDuringCommit) { + if (_allowConsumptionDuringBuild) { Review Comment: too many flags look unclean imo let's see if we can change it to an enum or something similar ``` private enum ConsumptionPolicy { ALLOW_ALWAYS, // Allow during both build and download ALLOW_DURING_BUILD_ONLY, // Allow during build but not download ALLOW_DURING_DOWNLOAD_ONLY, // Allow during download but not build DISALLOW_ALWAYS // Don't allow during either phase } ``` -- 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