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


##########
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:
   I can see the problem, CommandStatusReportPublisher is combining all 
available command in last 60sec. Normally it can have 2-3 last command set only.
   
   but incrementalReportsQueue can have CommandStatusReportsProto as list of 
large number which actually can cause issue. Single CommandStatusReportsProto 
will not be that big.
   
   But on safer size, I think we can limit the size to 2MB chunk in 
CommandStatusReportPublisher is better implementation, then splitting at later 
stage. there we can pick 2MB max size list to build response to fill the gap.



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