Skip to content

HDDS-8680. Optimize getting open pipelines from pipelineManager#4765

Merged
adoroszlai merged 1 commit intoapache:masterfrom
sodonnel:HDDS-8680
May 24, 2023
Merged

HDDS-8680. Optimize getting open pipelines from pipelineManager#4765
adoroszlai merged 1 commit intoapache:masterfrom
sodonnel:HDDS-8680

Conversation

@sodonnel
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

In the WriteableECContainerProvider, we need to get the list of open pipelines on each block allocation request.

Open pipelines for a replication config can be retrieved efficiently from the PipelineStateMap.query2OpenPipelines variable.

However the list then needs to be filtered to remove excluded datanodes or pipelines. In the common case, these exclusions will be empty, so we can optimize this by skipping the iterator if there is nothing to filter out.

What is the link to the Apache JIRA

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

How was this patch tested?

Existing tests should cover this.

Copy link
Copy Markdown
Contributor

@Xushaohong Xushaohong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @sodonnel for the refinement.

@Galsza
Copy link
Copy Markdown
Contributor

Galsza commented May 24, 2023

+1 Thanks @sodonnel looking good to me.

@adoroszlai adoroszlai merged commit b80da29 into apache:master May 24, 2023
@adoroszlai
Copy link
Copy Markdown
Contributor

Thanks @sodonnel for the patch, @Galsza, @Xushaohong for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants