shounakmk219 commented on code in PR #13803:
URL: https://github.com/apache/pinot/pull/13803#discussion_r1724320668


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -963,10 +970,29 @@ void updateIdealStateOnSegmentCompletion(String 
realtimeTableName, String commit
     }, RetryPolicies.exponentialBackoffRetryPolicy(10, 1000L, 1.2f));
   }
 
-  private boolean isTablePaused(IdealState idealState) {
+  public static boolean isTablePaused(IdealState idealState) {
+    PauseState pauseStatus = extractTablePauseStatus(idealState);
+    if (pauseStatus != null) {
+      return pauseStatus.isPaused();
+    }
+    // backward compatibility
+    // TODO : remove this handling after next release.
+    //  Expectation is that all table IS are migrated to the newer 
representation.
     return 
Boolean.parseBoolean(idealState.getRecord().getSimpleField(IS_TABLE_PAUSED));
   }
 
+  private static PauseState extractTablePauseStatus(IdealState idealState) {
+    String pauseStatusStr = 
idealState.getRecord().getSimpleField(PinotLLCRealtimeSegmentManager.PAUSE_STATUS);

Review Comment:
   Yeah will do, my bad relying completely on the IDE refactor feature😅



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

Reply via email to