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

pageserver: return 429 on timeline creation in progress #7225

Merged
merged 2 commits into from Mar 26, 2024

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Mar 25, 2024

Problem

Currently, we return 409 (Conflict) in two cases:

  • Temporary: Timeline creation cannot proceed because another timeline with the same ID is being created
  • Permanent: Timeline creation cannot proceed because another timeline exists with different parameters but the same ID.

Callers which time out a request and retry should be able to distinguish these cases.

Closes: #7208

Summary of changes

  • Expose AlreadyCreating errors as 429 instead of 409

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

Copy link

github-actions bot commented Mar 25, 2024

2742 tests run: 2604 passed, 0 failed, 138 skipped (full report)


Flaky tests (3)

Postgres 15

  • test_multi_attach: debug
  • test_vm_bit_clear_on_heap_lock: debug

Postgres 14

  • test_metrics_while_ignoring_broken_tenant_and_reloading: debug

Code coverage* (full report)

  • functions: 28.1% (6287 of 22345 functions)
  • lines: 47.0% (44227 of 94111 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
f51adfc at 2024-03-25T19:00:04.851Z :recycle:

@jcsp jcsp marked this pull request as ready for review March 25, 2024 18:28
@jcsp jcsp requested a review from a team as a code owner March 25, 2024 18:28
@jcsp jcsp requested a review from problame March 25, 2024 18:28
@jcsp jcsp added c/storage/pageserver Component: storage: pageserver a/tech_debt Area: related to tech debt labels Mar 26, 2024
Copy link
Contributor

@problame problame left a comment

Choose a reason for hiding this comment

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

I trust you checked that the control plane client does the right thing. Not obvious to me that they are aware, given the Slack thread linked in the issue.

@jcsp jcsp merged commit 8dfe3a0 into main Mar 26, 2024
60 of 61 checks passed
@jcsp jcsp deleted the jcsp/issue-7208-timeline-429 branch March 26, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt c/storage/pageserver Component: storage: pageserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pageserver: two concurrent timeline creations do not coalesce
2 participants