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


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -1696,6 +1705,20 @@ private IdealState updatePauseStatusInIdealState(String 
tableNameWithType, boole
     return updatedIdealState;
   }
 
+  public boolean updateStorageQuotaExceededInIdealState(String 
tableNameWithType, boolean quotaExceeded) {
+    IdealState is = getIdealState(tableNameWithType);
+    if (is.getRecord().getBooleanField(IS_QUOTA_EXCEEDED, false) != 
quotaExceeded) {
+      HelixHelper.updateIdealState(_helixManager, tableNameWithType, 
idealState -> {
+        ZNRecord znRecord = idealState.getRecord();
+        znRecord.setSimpleField(IS_QUOTA_EXCEEDED, 
Boolean.valueOf(quotaExceeded).toString());
+        return new IdealState(znRecord);
+      }, RetryPolicies.noDelayRetryPolicy(1));

Review Comment:
   No strong reason to not retry. Was keeping it inline with the table pause IS 
update. 
   Right now in case of failure the next segment commit or validation job, 
whichever runs first, will update the IS.
   Let me know if you have any magic number for retry in mind, maybe 3?



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