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

s3_scrubber: add tenant-snapshot #7444

Merged
merged 5 commits into from
Apr 29, 2024
Merged

s3_scrubber: add tenant-snapshot #7444

merged 5 commits into from
Apr 29, 2024

Conversation

jcsp
Copy link
Collaborator

@jcsp jcsp commented Apr 21, 2024

Problem

Downloading tenant data for analysis/debug with aws s3 cp works well for small tenants, but for larger tenants it is unlikely that one ends up with an index that matches layer files, due to the time taken to download.

Summary of changes

  • Add a tenant-snapshot command to the scrubber, which reads timeline indices and then downloads the layers referenced in the index, even if they were deleted. The result is a snapshot of the tenant's remote storage state that should be usable when imported (neon_local: add "tenant import" #7399 ).

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/feature Issue type: feature, for new features or requests c/storage Component: storage labels Apr 21, 2024
Copy link

github-actions bot commented Apr 21, 2024

2856 tests run: 2735 passed, 1 failed, 120 skipped (full report)


Failures on Postgres 15

  • test_sharding_split_failures[failure20]: debug
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_sharding_split_failures[debug-pg15-failure20]"
Flaky tests (2)

Postgres 16

  • test_vm_bit_clear_on_heap_lock: debug

Postgres 15

  • test_gc_of_remote_layers: debug

Code coverage* (full report)

  • functions: 28.1% (6551 of 23290 functions)
  • lines: 46.7% (46241 of 99017 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
b2d5082 at 2024-04-29T12:25:22.232Z :recycle:

s3_scrubber/src/lib.rs Outdated Show resolved Hide resolved
s3_scrubber/src/tenant_snapshot.rs Outdated Show resolved Hide resolved
s3_scrubber/src/tenant_snapshot.rs Show resolved Hide resolved
@jcsp jcsp marked this pull request as ready for review April 26, 2024 17:08
@jcsp jcsp enabled auto-merge (squash) April 29, 2024 08:02
@jcsp jcsp merged commit 2226ace into main Apr 29, 2024
53 checks passed
@jcsp jcsp deleted the jcsp/tenant-snapshot branch April 29, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/storage Component: storage t/feature Issue type: feature, for new features or requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants