Skip to content
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

pkg/ioutil: deflake TestPageWriterRandom #16268

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

fuweid
Copy link
Member

@fuweid fuweid commented Jul 18, 2023

The PageWriter has cache buffer so that it doesn't call the Writer until the cache is almost full. Since the data's length is random, the pending bytes should be always less than cache buffer size, instead of page size.

Fix: #16255

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

The PageWriter has cache buffer so that it doesn't call the Writer until
the cache is almost full. Since the data's length is random, the pending
bytes should be always less than cache buffer size, instead of page
size.

Fix: etcd-io#16255

Signed-off-by: Wei Fu <fuweid89@gmail.com>
Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks @fuweid

@ahrtr ahrtr merged commit 92de641 into etcd-io:main Jul 19, 2023
27 checks passed
@ahrtr
Copy link
Member

ahrtr commented Sep 8, 2023

Could anyone backport this PR to 3.4 as well?

FYI. https://github.com/etcd-io/etcd/actions/runs/6123643643/job/16621962420?pr=16556

@fuweid fuweid deleted the fix-TestPageWriterRandom branch September 8, 2023 15:58
@jmhbnz jmhbnz mentioned this pull request Sep 25, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

pkg/v3/ioutil TestPageWriterRandom is flaking
3 participants