jtao15 commented on code in PR #12045:
URL: https://github.com/apache/pinot/pull/12045#discussion_r1406815062
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -821,6 +821,19 @@ public void segmentStoppedConsuming(LLCSegmentName
llcSegmentName, String instan
_controllerMetrics.addMeteredTableValue(realtimeTableName,
ControllerMeter.LLC_ZOOKEEPER_UPDATE_FAILURES, 1L);
throw e;
}
+ // We know that we have successfully set the idealstate to be OFFLINE.
+ // We can now do a best effort to reset the externalview to be OFFLINE if
it is in ERROR state.
+ // If the externalview is not in error state, then this reset will be
ignored by the helix participant
+ // in the server when it receives the ERROR to OFFLINE state transition.
+ // Helix throws an exception if we try to reset state of a partition that
is NOT in ERROR state in EV,
+ // So, if any exceptions are thrown, ignore it here.
+ try {
+ _helixAdmin.resetPartition(_helixManager.getClusterName(), instanceName,
+
TableNameBuilder.REALTIME.tableNameWithType(llcSegmentName.getTableName()),
+ Collections.singletonList(segmentName));
+ } catch (Exception e) {
+ // Ignore
Review Comment:
(nit) Good to log the error
--
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]