Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Avoid unnecessary BufferPool creation for EC reconstruction flow:

// TODO: Let's avoid unnecessary bufferPool creation. This pool actually
//  not used in EC flows, but there are some dependencies on buffer pool.

Use an empty singleton BufferPool for that.

Also, convert some validation checks to real preconditions in BufferPool (i.e. perform the check before changing state, not afterwards).

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

How was this patch tested?

Existing tests:
https://github.com/adoroszlai/hadoop-ozone/actions/runs/5186666728

@adoroszlai adoroszlai self-assigned this Jun 6, 2023
@adoroszlai adoroszlai added the EC label Jun 6, 2023
Copy link
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

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

LGTM

@adoroszlai adoroszlai marked this pull request as draft June 7, 2023 03:03
@adoroszlai adoroszlai marked this pull request as ready for review June 7, 2023 05:50
@adoroszlai
Copy link
Contributor Author

@sodonnel thanks for the review. I've expanded the unit test and made some small tweaks in BufferPool and ChunkBufferImplWithByteBuffer: be702db Would you like to take another look?

@sodonnel
Copy link
Contributor

sodonnel commented Jun 7, 2023

Checked the latest commit - LGTM.

@adoroszlai adoroszlai merged commit b59ab14 into apache:master Jun 7, 2023
@adoroszlai
Copy link
Contributor Author

Thanks @sodonnel for taking another look.

@adoroszlai adoroszlai deleted the HDDS-8766 branch June 7, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants