Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-12547. Container creation and import use the same VolumeChoosingPolicy #8090

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

peterxcli
Copy link
Contributor

@peterxcli peterxcli commented Mar 15, 2025

What changes were proposed in this pull request?

Currently, KeyValueHandler and ContainerImporter have its owner VolumeChoosingPolicy instances. As the VolumeChoosingPolicy is decided by same "hdds.datanode.volume.choosing.policy" property, so KeyValueHandler and ContainerImporter and use the same VolumeChoosingPolicy instance.

Further, VolumeChoosingPolicy#chooseVolume, its Java Doc says "The implementations of this interface must be thread-safe.", regarding the space full check and space reservation, it can be done as an atomic operation in the chooseVolume internally, so that there will no over allocation of space due to concurrent container creation and container import.

What is the link to the Apache JIRA

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

How was this patch tested?

CI:
https://github.com/peterxcli/ozone/actions/runs/13871750654

@peterxcli peterxcli marked this pull request as ready for review March 15, 2025 11:22
@ivandika3 ivandika3 requested a review from ChenSammi March 15, 2025 12:55
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.

1 participant