ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-10593. Make client priority read from IN_SERVICE status Datanode

Open xichen01 opened this issue 1 year ago • 0 comments

What changes were proposed in this pull request?

Make client priority read from IN_SERVICE status Datanode.

When Ozone client read Block form Datanode, the SCM will return all the Datanodes where the replicas are located, including the nodes in the IN_MAINTENANCE, etc state, and the order may be random, so the client may try to access the IN_MAINTENANCE state node first. Sometimes, we set a Datanode to IN_MAINTENANCE, this may be due to some faults of the machine or wanting to restart a Datanode, in this scenario, that the Client does not read data form these IN_MAINTENANCE datanode is a good strategy.

PS: Since OM has a cache of Datanode state (expiration time 6min), the client can't get the latest state of Datanode, so we need to enhance the cache evicting mechanism.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10593

How was this patch tested?

Unit Test.

xichen01 avatar Mar 27 '24 10:03 xichen01