diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java index 362c08c6a94..1121188be9d 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java @@ -749,14 +749,10 @@ ContainerCommandResponseProto handleReadChunk( @VisibleForTesting void checkContainerIsHealthy(KeyValueContainer kvContainer, BlockID blockID, Type cmd) { - kvContainer.readLock(); - try { - if (kvContainer.getContainerData().getState() == State.UNHEALTHY) { - LOG.warn("{} request {} for UNHEALTHY container {} replica", cmd, - blockID, kvContainer.getContainerData().getContainerID()); - } - } finally { - kvContainer.readUnlock(); + // No kvContainer.readLock() for performance optimization + if (kvContainer.getContainerData().getState() == State.UNHEALTHY) { + LOG.warn("{} request {} for UNHEALTHY container {} replica", cmd, + blockID, kvContainer.getContainerData().getContainerID()); } }