-
Notifications
You must be signed in to change notification settings - Fork 164
Namanmahor/plat 265 support file size info reading #8663
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
base: main
Are you sure you want to change the base?
Namanmahor/plat 265 support file size info reading #8663
Conversation
…upport-file-size-info-reading
…upport-file-size-info-reading
…upport-file-size-info-reading
| // Lists objects within a folder-like level (using path prefix and delimiter). | ||
| string path = 4; | ||
| string delimiter = 5; | ||
| uint32 page_size = 6 [(validate.rules).uint32 = {ignore_empty: true, lte: 100}]; | ||
| string page_token = 7; | ||
| // Lists objects matching the glob pattern. | ||
| string glob = 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Lists objects within a folder-like level (using path prefix and delimiter). | |
| string path = 4; | |
| string delimiter = 5; | |
| uint32 page_size = 6 [(validate.rules).uint32 = {ignore_empty: true, lte: 100}]; | |
| string page_token = 7; | |
| // Lists objects matching the glob pattern. | |
| string glob = 6; | |
| // Lists objects within a folder-like level (using path prefix and delimiter). Cannot be used if `glob` is passed. | |
| string path = 4; | |
| string delimiter = 5; | |
| // Lists objects matching the glob pattern. Cannot be used if `path` or `delimiter` is passed. | |
| string glob = 6; |
| entries, err := pagination.CollectAll(ctx, | ||
| func(ctx context.Context, pz uint32, tk string) ([]drivers.ObjectStoreEntry, string, error) { | ||
| return b.ListObjectsForGlob(ctx, opts.Glob, pz, tk) | ||
| }, | ||
| 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this add new network overhead?
I'm wondering if it would be better to still also support full listings in ListObjectsForGlob (e.g. pageSize == 0 could mean return all).
| // Handle GCS | ||
| var q *storage.Query | ||
| if as(&q) { | ||
| // Only fetch the fields we need. | ||
| _ = q.SetAttrSelection([]string{"Name", "Size", "Created", "Updated"}) | ||
| if startAfter != "" { | ||
| q.StartOffset = startAfter | ||
| } | ||
| } | ||
| // Handle S3 | ||
| var s3Input *s3.ListObjectsV2Input | ||
| if as(&s3Input) { | ||
| if startAfter != "" { | ||
| s3Input.StartAfter = aws.String(startAfter) | ||
| } | ||
| } | ||
| return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about Azure?
PLAT-265: Support file size info reading
Checklist: