ozone
ozone copied to clipboard
HDDS-11413. PipelineManagerImpl lock optimization reduces AllocateBlock latency
What changes were proposed in this pull request?
PipelineManagerImpl lock optimization reduces AllocateBlock latency
The following are the issues discovered in our production environment:
When applying for a block in the Ratis replica, there may be jitter in the P99 latency due to obtaining a read lock
The main parts that hold write locks:
org.apache.hadoop.hdds.scm.pipeline.WritableECContainerProvider#allocateContainer
EC pipelines are frequently created and closed because there is only one container in each EC pipeline. When the container is full, the creation of new ones will be closed. When creating a pipeline, a write lock at the pipeline manager level will be held, while when applying for a Ratis block, a read lock at the pipeline manager level will be held.
The purpose of this optimization is to unlock. When creating and closing an EC pipeline, only the write lock at the EC pipeline manager level will be held, while when applying for a ratis replica block, only the read lock of the ratis pipeline manager will be held. The two locks will not affect each other.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11413