sadanand48 commented on code in PR #11962:
URL: https://github.com/apache/ozone/pull/11962#discussion_r4534661425
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/HeartbeatEndpointTask.java:
##########
@@ -148,25 +170,34 @@ public EndpointStateMachine.EndPointStates call() throws
Exception {
requestBuilder = SCMHeartbeatRequestProto.newBuilder()
.setDatanodeDetails(datanodeDetailsProto)
.setDatanodeVersion(versionInfo);
- addReports(requestBuilder);
+ int reportCount = addNonCommandStatusReports(requestBuilder);
addContainerActions(requestBuilder);
addPipelineActions(requestBuilder);
addQueuedCommandCounts(requestBuilder);
+ commandStatusSelection = addCommandStatusReports(
+ requestBuilder, maxReportsPerHB - reportCount);
SCMHeartbeatRequestProto request = requestBuilder.build();
LOG.debug("Sending heartbeat message : {}", request);
SCMHeartbeatResponseProto response = rpcEndpoint.getEndPoint()
.sendHeartbeat(request);
processResponse(response, datanodeDetailsProto);
rpcEndpoint.setLastSuccessfulHeartbeat(ZonedDateTime.now());
rpcEndpoint.zeroMissedCount();
- if (context.hasPendingReports(rpcEndpoint.getAddress())) {
- // addReports was capped at maxReportsPerHB and left reports queued.
Trigger immediately.
- context.getParent().setNextHB(Time.monotonicNow());
+ if (context.getQueueMetrics() != null) {
Review Comment:
A 2 MB publisher chunk can only be a target, not a guaranteed limit, because
one CommandStatus may itself exceed 2 MB and its ACK results cannot be split.
That larger status would still require the oversized progress path.
Also, accumulated reports are not sent one per heartbeat. Heartbeat
selection packs multiple queued reports until the total command-status byte or
report-count budget is reached, with the remainder sent in subsequent scheduled
heartbeats. Therefore, publisher chunking does not replace endpoint-level total
budgeting or oversized-status handling.
--
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]