-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-12081. TestKeyInputStream repeats tests with default container layout #7704
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
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()?
jojochuang
left a comment
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 |
jojochuang
left a comment
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:
TestChunkInputStreamandTestKeyInputStreamrepeat tests with default container layout, instead of testing with bothFILE_PER_BLOCKandFILE_PER_CHUNK.Causes:
FILE_PER_BLOCK.KeyValueHandlerdoes not allow creating containers withFILE_PER_CHUNKlayout, 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.handleCreateContainerto 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