-
Notifications
You must be signed in to change notification settings - Fork 517
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
Conversation
scm.getContainerManager().getContainers().forEach(container -> { | ||
if (container.isOpen()) { | ||
try { | ||
TestHelper.waitForContainerClose(getCluster(), container.getContainerID()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this.
Once open containers are closed, SCM will recreate open containers. Containers will be created using the layout specified at the DataNodes, which doesn't get updated until the start of the next test.
Wouldn't it make more sense to call closeContainers() after updateConfig()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there are a few other tests still using FILE_PER_CHUNK. TestFinalizeBlock is one of them. Should it get rid of duplicate tests that reference FILE_PER_CHUNK?
Thanks @jojochuang for the review, good points. I have updated the patch. (I don't intend to remove usage of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Merged. Thanks @adoroszlai for quick update. |
Thanks @jojochuang for reviewing and merging this. |
What changes were proposed in this pull request?
Problem:
TestChunkInputStream
andTestKeyInputStream
repeat tests with default container layout, instead of testing with bothFILE_PER_BLOCK
andFILE_PER_CHUNK
.Causes:
FILE_PER_BLOCK
.KeyValueHandler
does not allow creating containers withFILE_PER_CHUNK
layout, even if configured correctly (since HDDS-11753).Fix:
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.ozone/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java
Lines 395 to 399 in 0723902
CI:
https://github.com/adoroszlai/ozone/actions/runs/12783565176