9aman commented on code in PR #16071:
URL: https://github.com/apache/pinot/pull/16071#discussion_r2174254274


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -2514,28 +2516,19 @@ public void 
repairSegmentsInErrorStateForPauselessConsumption(TableConfig tableC
         segmentsInErrorStateInAtLeastOneReplica.size(), 
segmentsInErrorStateInAtLeastOneReplica,
         segmentsInErrorStateInAllReplicas.size(), 
segmentsInErrorStateInAllReplicas, realtimeTableName);
 
-    boolean isPartialUpsertEnabled =
-        tableConfig.getUpsertConfig() != null && 
tableConfig.getUpsertConfig().getMode() == UpsertConfig.Mode.PARTIAL;
-    boolean isDedupEnabled = tableConfig.getDedupConfig() != null && 
tableConfig.getDedupConfig().isDedupEnabled();
-    if ((isPartialUpsertEnabled || isDedupEnabled) && 
!repairErrorSegmentsForPartialUpsertOrDedup) {
+    if 
(!allowRepairOfErrorSegments(repairErrorSegmentsForPartialUpsertOrDedup, 
tableConfig)) {
       // We do not run reingestion for dedup and partial upsert tables in 
pauseless as it can
       // lead to data inconsistencies
       _controllerMetrics.setOrUpdateTableGauge(realtimeTableName,
           ControllerGauge.PAUSELESS_SEGMENTS_IN_UNRECOVERABLE_ERROR_COUNT, 
segmentsInErrorStateInAllReplicas.size());
-      LOGGER.error("Skipping repair for errored segments in table: {} because 
dedup or partial upsert is enabled.",
-          realtimeTableName);
+      LOGGER.error("Skipping repair for errored segments in table: {}.", 
realtimeTableName);

Review Comment:
   Can we move these log lines to the function `allowRepairOfErrorSegments` 
since it's only being called from here. 
   
   We can then add information like `PartialUpsert enabled` or 
`repairErrorSegmentForPartialUpsertOrDedup is set to true` as the reason for 
skipping re-ingestion instead of loosing this info. 



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