Skip to content

Commit

Permalink
saves 1 zk call
Browse files Browse the repository at this point in the history
  • Loading branch information
noob-se7en committed Jan 16, 2025
1 parent 8c8d8d3 commit 1be0316
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ public JsonNode getForceCommitJobStatus(
controllerJobZKMetadata.put(CommonConstants.ControllerJob.CONSUMING_SEGMENTS_YET_TO_BE_COMMITTED_LIST,
JsonUtils.objectToString(segmentsYetToBeCommitted));

_pinotHelixResourceManager.updateForceCommitJobMetadata(forceCommitJobId, segmentsYetToBeCommitted,
controllerJobZKMetadata);
if (segmentsYetToBeCommitted.size() < segmentsToCheck.size()) {
_pinotHelixResourceManager.updateForceCommitJobMetadata(forceCommitJobId, segmentsYetToBeCommitted,
controllerJobZKMetadata);
}

Map<String, Object> result = new HashMap<>(controllerJobZKMetadata);
result.put("numberOfSegmentsYetToBeCommitted", segmentsYetToBeCommitted.size());
Expand Down

0 comments on commit 1be0316

Please sign in to comment.