sadanand48 commented on code in PR #11962:
URL: https://github.com/apache/ozone/pull/11962#discussion_r4549750571


##########
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:
   500k × 60 bytes is approximately 30 MB , not 3–4 MB. Also, the 500k limit is 
configurable and is a transaction/block-count limit rather than a 
serialized-byte guarantee.
   
   More importantly, CommandStatusReportPublisher currently combines all 
available CommandStatus entries into one CommandStatusReportsProto. Therefore, 
several individually bounded responses can still produce an aggregate exceeding 
the 64 MB or safe RPC budget.
   



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