Skip to content

Fix zstd:flush/2#10930

Merged
jhogberg merged 1 commit intoerlang:masterfrom
rickard-green:rickard/zstd-flush-fix
Apr 22, 2026
Merged

Fix zstd:flush/2#10930
jhogberg merged 1 commit intoerlang:masterfrom
rickard-green:rickard/zstd-flush-fix

Conversation

@rickard-green
Copy link
Copy Markdown
Contributor

Fix zstd:flush/2 introduced in #10511 @essen @jhogberg

In debug mode, the zstd NIF reduce the chunk size to 5 which causes the zstd:flush/2 function in the cstream testcase to return {flush, _} which causes the testcase to fail. {flush, _} is not a valid return value according to the docs.

This PR prevents the testcase failure, but the change in this PR is a guess of what the flush/2 function should have done. I'm not sure if this fix is correct or complete.

@rickard-green rickard-green added team:VM Assigned to OTP team VM fix labels Mar 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 27, 2026

CT Test Results

    2 files    100 suites   1h 8m 17s ⏱️
2 289 tests 2 237 ✅ 52 💤 0 ❌
2 708 runs  2 652 ✅ 56 💤 0 ❌

Results for commit eb3d0a3.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

jhogberg
jhogberg previously approved these changes Mar 30, 2026
Comment thread lib/stdlib/src/zstd.erl Outdated
@jhogberg jhogberg self-assigned this Mar 30, 2026
Co-authored-by: "John Högberg" <john@erlang.org>
@jhogberg jhogberg force-pushed the rickard/zstd-flush-fix branch from 8413ea4 to eb3d0a3 Compare April 20, 2026 07:51
@jhogberg jhogberg added the testing currently being tested, tag is used by OTP internal CI label Apr 20, 2026
@jhogberg jhogberg merged commit 68233d5 into erlang:master Apr 22, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants