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

Get object sizes based on S3's ListObjects output (just with scan_object_sizes() to start with) #2248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

poodlewars
Copy link
Collaborator

@poodlewars poodlewars commented Mar 14, 2025

Monday: 8560764974

Limited to just scan_object_sizes to start with, to show the idea.

Calculate object sizes using functionality in the storage backend itself when possible. This PR calculates compressed sizes on S3 based on the ListObjectsV2 output, so we don't need to read all the keys.

For storages where we haven't implemented anything fancy, just read all the (compressed) keys and check the compressed size on their header.

Remaining work:

  • Use this approach for scan_object_sizes_by_stream
  • Make sure we have testing against all backends especially NFS
  • Implement scan_object_sizes_for_stream
  • Native size calculations for LMDB and Azure
  • Native size calculation for library size (LMDB has an API to do this "in one")
  • AdminTools Python API on the v2 API, including search by regex. Docs page to explain the output.

@poodlewars poodlewars added the patch Small change, should increase patch version label Mar 14, 2025
@poodlewars poodlewars force-pushed the aseaton/8560764974/library-size-api-storage-native branch from 02760e6 to 7739abc Compare March 14, 2025 16:31
@poodlewars poodlewars marked this pull request as ready for review March 14, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Small change, should increase patch version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant