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


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -2572,6 +2565,36 @@ public void 
repairSegmentsInErrorStateForPauselessConsumption(TableConfig tableC
     }
   }
 
+  private boolean allowRepairOfErrorSegments(boolean 
repairErrorSegmentsForPartialUpsertOrDedup,
+      TableConfig tableConfig) {
+    if (repairErrorSegmentsForPartialUpsertOrDedup) {
+      // If API context has repairErrorSegmentsForPartialUpsertOrDedup=true, 
allow repair.
+      return true;
+    }
+
+    boolean isPartialUpsertEnabled = (tableConfig.getUpsertConfig() != null) 
&& (tableConfig.getUpsertConfig().getMode()
+        == UpsertConfig.Mode.PARTIAL);
+    if (isPartialUpsertEnabled) {
+      // If isPartialUpsert is enabled, do not allow repair.
+      return false;
+    }
+
+    DedupConfig dedupConfig = tableConfig.getDedupConfig();
+    boolean isDedupEnabled = (dedupConfig != null) && 
(dedupConfig.isDedupEnabled());
+    if (isDedupEnabled) {
+      DisasterRecoveryMode disasterRecoveryMode = 
dedupConfig.getDisasterRecoveryMode();
+      if (disasterRecoveryMode == null) {

Review Comment:
   Using Default mode  for `not recovering` here instead of relying on null. 
   



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