sumitagrawl commented on code in PR #4505:
URL: https://github.com/apache/ozone/pull/4505#discussion_r1165644394
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/CloseContainerEventHandler.java:
##########
@@ -104,14 +113,19 @@ public void onMessage(ContainerID containerID,
EventPublisher publisher) {
command.setTerm(scmContext.getTermOfLeader());
command.setEncodedToken(getContainerToken(containerID));
- getNodes(container).forEach(node ->
- publisher.fireEvent(DATANODE_COMMAND,
- new CommandForDatanode<>(node.getUuid(), command)));
+ try {
+ leaseManager.acquire(command, timeout, () -> triggerCloseCallback(
+ publisher, container, command));
Review Comment:
@errose28 Current usages has no problem, and to remove unused code which is
having unsafe usages of lease manager method,
[HDDS-8418](https://issues.apache.org/jira/browse/HDDS-8418) is added.
--
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]