You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2026/07/15 10:18:44 UTC
[PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
adoroszlai opened a new pull request, #8770:
URL: https://github.com/apache/ozone/pull/8770
## What changes were proposed in this pull request?
Fix intermittent test failure in `TestContainerOperations`. Let the test pass if any datanode usage info has more containers than SCM's view of the same container (which may be slightly outdated).
https://issues.apache.org/jira/browse/HDDS-13310
## How was this patch tested?
Before: 5/100 failures.
https://github.com/adoroszlai/ozone/actions/runs/16175931905/job/45662413733
After: no failures
https://github.com/adoroszlai/ozone/actions/runs/16174065813
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan commented on code in PR #8770:
URL: https://github.com/apache/ozone/pull/8770#discussion_r3594858169
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestContainerOperations.java:
##########
@@ -195,12 +199,23 @@ public void testDatanodeUsageInfoContainerCount() throws Exception {
List<? extends DatanodeDetails> dnList = nodeManager.getAllNodes();
for (DatanodeDetails dn : dnList) {
- List<HddsProtos.DatanodeUsageInfoProto> usageInfoList =
- storageClient.getDatanodeUsageInfo(
- dn.getIpAddress(), dn.getUuidString());
+ GenericTestUtils.waitFor(() -> {
+ try {
+ List<HddsProtos.DatanodeUsageInfoProto> usageInfoList =
+ storageClient.getDatanodeUsageInfo(dn.getIpAddress(), dn.getUuidString());
- assertEquals(1, usageInfoList.size());
- assertEquals(nodeManager.getContainers(dn).size(), usageInfoList.get(0).getContainerCount());
+ assertEquals(1, usageInfoList.size());
+
+ long expected = nodeManager.getContainers(dn).size();
+ long actual = usageInfoList.get(0).getContainerCount();
+ LOG.info("Container count expected: {}, actual: {}", expected, actual);
+
+ return expected == actual;
+ } catch (Exception e) {
+ LOG.info("Failed to get container count", e);
Review Comment:
Minor thought: if this times out, would it be helpful to include the last observed expected/actual counts in the failure message? It might save a little log digging if this ever flakes again.
Iām not sure whether you see value in that extra diagnostic; I'm happy to defer if the current logging is considered sufficient. š
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8770:
URL: https://github.com/apache/ozone/pull/8770#issuecomment-4984353750
@chihsuan please take a look
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #8770:
URL: https://github.com/apache/ozone/pull/8770
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8770:
URL: https://github.com/apache/ozone/pull/8770#issuecomment-5456120217
Thanks @ayushtkn, @chihsuan, @SaketaChalamchala for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai closed pull request #8770: HDDS-13310. Intermittent failure in TestContainerOperations
URL: https://github.com/apache/ozone/pull/8770
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8770:
URL: https://github.com/apache/ozone/pull/8770#discussion_r2203474434
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestContainerOperations.java:
##########
@@ -203,7 +203,8 @@ public void testDatanodeUsageInfoContainerCount() throws Exception {
dn.getIpAddress(), dn.getUuidString());
assertEquals(1, usageInfoList.size());
- assertEquals(expected, usageInfoList.get(0).getContainerCount());
+ assertThat(usageInfoList.get(0).getContainerCount())
+ .isGreaterThanOrEqualTo(expected);
Review Comment:
The test makes two different calls to SCM that each return data about containers for a specific datanode. They both use the same ultimate source of container list. SCM collects info from datanodes in the background (incremental container report and heartbeat). So if a container gets created by a previous test case, it may be added to SCM's list between the two calls.
We could add `waitFor`, but would need to repeat both calls, since no matter which one we choose as the reference (first call), the second call may return the same number or more.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn commented on code in PR #8770:
URL: https://github.com/apache/ozone/pull/8770#discussion_r2200692838
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestContainerOperations.java:
##########
@@ -203,7 +203,8 @@ public void testDatanodeUsageInfoContainerCount() throws Exception {
dn.getIpAddress(), dn.getUuidString());
assertEquals(1, usageInfoList.size());
- assertEquals(expected, usageInfoList.get(0).getContainerCount());
+ assertThat(usageInfoList.get(0).getContainerCount())
+ .isGreaterThanOrEqualTo(expected);
Review Comment:
is it due to some datanode having outdated information, which gets updated later before the assertion kicks in? In that case can something like GenericTestUtils.waitFor or some util which triggers datanode to update the info work?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8770:
URL: https://github.com/apache/ozone/pull/8770#issuecomment-3139048661
The test was changed in #8677, apparently it passes now on `master`: https://github.com/adoroszlai/ozone/actions/runs/16642772549
Closing. Will reopen if it happens again.
Thanks @ayushtkn for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13310. Intermittent failure in TestContainerOperations [ozone]
Posted by "SaketaChalamchala (via GitHub)" <gi...@apache.org>.
SaketaChalamchala commented on code in PR #8770:
URL: https://github.com/apache/ozone/pull/8770#discussion_r3769428606
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestContainerOperations.java:
##########
@@ -195,12 +199,23 @@ public void testDatanodeUsageInfoContainerCount() throws Exception {
List<? extends DatanodeDetails> dnList = nodeManager.getAllNodes();
for (DatanodeDetails dn : dnList) {
- List<HddsProtos.DatanodeUsageInfoProto> usageInfoList =
- storageClient.getDatanodeUsageInfo(
- dn.getIpAddress(), dn.getUuidString());
+ GenericTestUtils.waitFor(() -> {
+ try {
+ List<HddsProtos.DatanodeUsageInfoProto> usageInfoList =
+ storageClient.getDatanodeUsageInfo(dn.getIpAddress(), dn.getUuidString());
- assertEquals(1, usageInfoList.size());
- assertEquals(nodeManager.getContainers(dn).size(), usageInfoList.get(0).getContainerCount());
+ assertEquals(1, usageInfoList.size());
+
+ long expected = nodeManager.getContainers(dn).size();
+ long actual = usageInfoList.get(0).getContainerCount();
+ LOG.info("Container count expected: {}, actual: {}", expected, actual);
Review Comment:
nit:
```suggestion
LOG.info("Container count expected: {}, actual: {}, dn: {}", expected, actual, dn.getUuidString());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org