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

tests: stabilize test_timeline_size_quota_on_startup #8255

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Jul 3, 2024

Problem

test_timeline_size_quota_on_startup assumed that writing data beyond the size limit would always be blocked. This is not so: the limit is only enforced if feedback makes it back from the pageserver to the safekeeper + compute.

Closes: #6562

Summary of changes

  • Modify the test to wait for the pageserver to catch up. The size limit was never actually being enforced robustly, the original version of this test was just writing much more than 30MB and about 98% of the time getting lucky such that the feedback happened to arrive before the tests for loop was done.
  • If the test fails, log the logical size as seen by the pageserver.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@jcsp jcsp added t/bug Issue Type: Bug a/test Area: related to testing c/compute Component: compute, excluding postgres itself labels Jul 3, 2024
@jcsp jcsp requested a review from lubennikovaav July 3, 2024 21:56
@jcsp jcsp marked this pull request as ready for review July 3, 2024 22:40
Copy link

github-actions bot commented Jul 3, 2024

3067 tests run: 2952 passed, 0 failed, 115 skipped (full report)


Flaky tests (3)

Postgres 16

  • test_isolation[None]: debug
  • test_sharding_split_compaction[compact-shard-ancestors-localonly]: debug

Postgres 14

  • test_tenant_creation_fails: debug

Code coverage* (full report)

  • functions: 32.6% (6938 of 21280 functions)
  • lines: 50.0% (54539 of 109057 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
366105d at 2024-07-08T20:14:01.160Z :recycle:

Copy link
Contributor

@lubennikovaav lubennikovaav left a comment

Choose a reason for hiding this comment

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

lgtm
thank you for fixing it!

@jcsp jcsp enabled auto-merge (squash) July 8, 2024 15:22
@jcsp jcsp merged commit 811eb88 into main Jul 8, 2024
65 checks passed
@jcsp jcsp deleted the jcsp/size-quota-flake branch July 8, 2024 20:06
skyzh pushed a commit that referenced this pull request Jul 15, 2024
## Problem

`test_timeline_size_quota_on_startup` assumed that writing data beyond
the size limit would always be blocked. This is not so: the limit is
only enforced if feedback makes it back from the pageserver to the
safekeeper + compute.

Closes: #6562

## Summary of changes

- Modify the test to wait for the pageserver to catch up. The size limit
was never actually being enforced robustly, the original version of this
test was just writing much more than 30MB and about 98% of the time
getting lucky such that the feedback happened to arrive before the tests
for loop was done.
- If the test fails, log the logical size as seen by the pageserver.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/test Area: related to testing c/compute Component: compute, excluding postgres itself t/bug Issue Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_timeline_size_quota_on_startup is flaky
2 participants