swamirishi commented on code in PR #7418:
URL: https://github.com/apache/ozone/pull/7418#discussion_r1850429678
##########
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:
Discussed offline:
We came to a conclusion adding a validation block at applyTransactionSerial
& startTransaction would not help. Start transaction on follower doesn't allow
throwing an exception and it will bring down the state machine. If the state
machine gets closed, we will never be able to clear up the raft meta data after
the state machine goes down. The same is true applyTransactionSerial as well.
Even though it allows throwing an exception that also brings down the
statemachine. So the only easy solution (Handling things on Ozone side and not
relying on raft) here is to add it to the apply transaction block and return an
error response which would make the containerStateMachine unhealthy but would
still allow a close pipeline on it since the statemachine is still healthy.
--
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]