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-12081. TestKeyInputStream repeats tests with default container layout #7704

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Problem:
TestChunkInputStream and TestKeyInputStream repeat tests with default container layout, instead of testing with both FILE_PER_BLOCK and FILE_PER_CHUNK.

Causes:

  • The tests set wrong string representation of the configured container layout (since HDDS-4552). Test cluster always falls back to the default layout, FILE_PER_BLOCK.
  • KeyValueHandler does not allow creating containers with FILE_PER_CHUNK layout, even if configured correctly (since HDDS-11753).

Fix:

  • Change the tests to start the cluster only once, with the default layout.
  • Set the layout in datanode configs right before creating data.
  • Close existing containers afterwards, to ensure each test writes data to new container, created with the layout being tested.

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

How was this patch tested?

Added temporary log in KeyValueHandler.handleCreateContainer to show the layout being used.

ContainerLayoutVersion layoutVersion =
ContainerLayoutVersion.getConfiguredVersion(conf);
KeyValueContainerData newContainerData = new KeyValueContainerData(
containerID, layoutVersion, maxContainerSize, request.getPipelineID(),
getDatanodeId());

CI:
https://github.com/adoroszlai/ozone/actions/runs/12783565176

@adoroszlai adoroszlai self-assigned this Jan 15, 2025
@adoroszlai adoroszlai requested a review from jojochuang January 16, 2025 03:42
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.

1 participant