You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "lilei1128 (via GitHub)" <gi...@apache.org> on 2026/05/23 10:13:09 UTC
[I] Flaky TestSnapshotSummary#testFileSizeSummaryWithDVs caused by generateContentLength returning 0 [iceberg]
lilei1128 opened a new issue, #16542:
URL: https://github.com/apache/iceberg/issues/16542
`TestSnapshotSummary#testFileSizeSummaryWithDVs` is a flaky test that fails intermittently in CI.
`FileGenerationUtil.generateContentLength()` uses `random().nextInt(10_000)`, which can return **0** with a probability of 1/10,000.
When a DV's `contentSizeInBytes` is 0:
1. `addedSize` accumulates to 0 in `UpdateMetrics.addedFile()`
2. `SnapshotSummary.addTo()` skips writing the `"added-files-size"` field due to the guard `setIf(addedSize > 0, builder, ADDED_FILE_SIZE_PROP, addedSize)`
3. The snapshot summary ends up with 18 fields instead of the expected 19
4. `assertThat(summary2).hasSize(19)` fails
## Failure Output
<img width="2182" height="392" alt="Image" src="https://github.com/user-attachments/assets/35067352-720d-481a-a1de-e096495df334" />
## Fix
Change `generateContentLength()` in `FileGenerationUtil` to guarantee a positive value:
--
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@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Flaky TestSnapshotSummary#testFileSizeSummaryWithDVs caused by generateContentLength returning 0 [iceberg]
Posted by "lilei1128 (via GitHub)" <gi...@apache.org>.
lilei1128 closed issue #16542: Flaky TestSnapshotSummary#testFileSizeSummaryWithDVs caused by generateContentLength returning 0
URL: https://github.com/apache/iceberg/issues/16542
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org