You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2023/02/07 22:36:57 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #10239: add an API to reset segments with Error EV

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


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java:
##########
@@ -541,6 +541,41 @@ public SuccessResponse resetSegment(
     }
   }
 
+  /**
+   * Resets segments with Error EV of the given table
+   * This API will take segments to OFFLINE state, wait for External View to stabilize, and then back to
+   * ONLINE/CONSUMING state,
+   * thus effective in resetting segments or consumers in error states.
+   */
+  @POST
+  @Path("segments/{tableNameWithType}/resetErrorEvSegments")

Review Comment:
   Suggest modifying `segments/{tableNameWithType}/reset` and include a query parameter `errorSegmentsOnly` instead of introducing a new API since their purpose is very similar



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -2430,11 +2429,41 @@ public void resetSegment(String tableNameWithType, String segmentName, @Nullable
     }
   }
 
+  /**
+   * Resets segments with Error EV of a table. This operation invoke resetPartition via state transition message.
+   */
+  public void resetErrorEvSegments(String tableNameWithType, @Nullable String targetInstance) {

Review Comment:
   Same here, we may introduce a boolean `errorSegmentsOnly` to `resetAllSegments`



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org