szetszwo commented on code in PR #7418:
URL: https://github.com/apache/ozone/pull/7418#discussion_r1847618976
##########
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:
> ... just the add log will fail on one server right?
`handleApplyTransactionFailure` will call `triggerPipelineClose`. It will
close the pipeline.
> ... We would be just performing this check on the leader right?
No, `startTransaction(LogEntryProto, RaftPeerRole)` is for follower. Leader
has a different `startTransaction` method. Please see the javadoc.
We don't have to check leader -- it is not in the group, it won't be the
leader.
--
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]