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


##########
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:
   CommandStatusReportPublisher currently returns one CommandStatusReportsProto 
per execution, and the generic ReportPublisher enqueues one message. Producing 
one report per CommandStatus in the same cycle therefore requires changing the 
generic publisher contract to publish a collection of reports.
   
   If only getReport() is changed to return one command status, the remaining 
statuses would drain one per command-status report interval, which is 60 
seconds by default. This moves the splitting upstream and broadens the change; 
it does not simply remove splitting. Are you proposing that we change 
ReportPublisher to support publishing multiple reports per execution?



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