jojochuang commented on code in PR #10030:
URL: https://github.com/apache/ozone/pull/10030#discussion_r3089263328
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -1165,13 +1165,16 @@ public CompletableFuture<Message>
applyTransaction(TransactionContext trx) {
+ "{} Container Result: {}", getGroupId(), r.getCmdType(),
index,
r.getMessage(), r.getResult());
metrics.incNumApplyTransactionsFails();
+ // Mark the container unhealthy BEFORE completing the future so that
+ // any subsequent applyTransaction sees the unhealthy state
immediately
+ // when it calls checkContainerHealthy (race-free).
+ stateMachineHealthy.compareAndSet(true, false);
+ unhealthyContainers.add(requestProto.getContainerID());
// Since the applyTransaction now is completed exceptionally,
// before any further snapshot is taken , the exception will be
// caught in stateMachineUpdater in Ratis and ratis server will
// shutdown.
applyTransactionFuture.completeExceptionally(sce);
- stateMachineHealthy.compareAndSet(true, false);
- unhealthyContainers.add(requestProto.getContainerID());
Review Comment:
functional change should go to a separate PR.
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestSecureOzoneRpcClient.java:
##########
Review Comment:
not necessarily needed.
##########
hadoop-ozone/csi/pom.xml:
##########
@@ -33,15 +33,6 @@
</properties>
<dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf.version}</version>
- </dependency>
Review Comment:
i'm not sure we want to replace guava too.
Protobuf? not sure either.
--
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]