ChenSammi commented on code in PR #6127:
URL: https://github.com/apache/ozone/pull/6127#discussion_r1471415088
##########
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) {
Review Comment:
@sodonnel , you can find the detail info under HDDS-10146. The scenario is
when there are a lot of block deletions happening, read other blocks in the
same container as being deleted block will be blocked due to unable to query
container's read lock. The lock is hold by the thread doing the block
deletion.
--
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]