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

Replace MAX_KEYS_PER_DELETE constant with function #10061

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

arpad-m
Copy link
Member

@arpad-m arpad-m commented Dec 9, 2024

Azure has a different per-request limit of 256 items for bulk deletion compared to the number of 1000 on AWS. Therefore, we need to support multiple values. Due to GenericRemoteStorage, we can't add an associated constant, but it has to be a function.

The PR replaces the MAX_KEYS_PER_DELETE constant with a function of the same name, implemented on both the RemoteStorage trait as well as on GenericRemoteStorage.

The value serves as hint of how many objects to pass to the delete_objects function.

Reading:

Part of #7931

@arpad-m arpad-m requested a review from a team as a code owner December 9, 2024 15:54
@arpad-m arpad-m requested a review from erikgrinaker December 9, 2024 15:54
@arpad-m arpad-m mentioned this pull request Dec 9, 2024
5 tasks
Copy link

github-actions bot commented Dec 9, 2024

7051 tests run: 6726 passed, 0 failed, 325 skipped (full report)


Flaky tests (8)

Postgres 17

Postgres 16

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 31.4% (8336 of 26534 functions)
  • lines: 47.7% (65569 of 137388 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
822494f at 2024-12-09T17:41:25.443Z :recycle:

Copy link
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

Seem fine as a targeted fix.

In general, I think it'd be better to hide this as an implementation detail. For example by having a method that deletes objects from an iterator, handling the batching internally.

@arpad-m arpad-m added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit c51db1d Dec 10, 2024
82 checks passed
@arpad-m arpad-m deleted the arpad/dynamic_bulk_deletion_chunk_sizes branch December 10, 2024 11:30
@arpad-m
Copy link
Member Author

arpad-m commented Dec 10, 2024

I think such an API wold be more complicated and not a good idea. We also want to avoid having remote_storage do retries itself as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants