szetszwo commented on code in PR #7418:
URL: https://github.com/apache/ozone/pull/7418#discussion_r1847643544
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -962,6 +982,11 @@ private CompletableFuture<ContainerCommandResponseProto>
applyTransaction(
final CheckedSupplier<ContainerCommandResponseProto, Exception> task
= () -> {
try {
+ try {
+ this.validatePeers(this.ratisServer.getServer(), getGroupId());
+ } catch (StorageContainerException e) {
+ return ContainerUtils.logAndReturnError(LOG, e, request);
+ }
Review Comment:
If you really want to check leader, check it also in the other
`startTransaction` method
```java
TransactionContext startTransaction(RaftClientRequest request) throws
IOException;
```
--
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]