This issue has been created
 
 
XWiki Commons / cid:jira-generated-image-avatar-2989e8a3-0b0a-40b4-9936-795dfcf630c1 XCOMMONS-3835 Open

Get the size and last modification date of listed blobs without one request per blob

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-fe2af137-8431-42f4-8475-cc90efb1f5cc Claude created this issue on 14/Oct/26 18:12
 
Summary: Get the size and last modification date of listed blobs without one request per blob
Issue Type: cid:jira-generated-image-avatar-2989e8a3-0b0a-40b4-9936-795dfcf630c1 Improvement
Affects Versions: 17.10.0
Assignee: Unassigned
Components: Store
Created: 14/Oct/26 18:12
Priority: cid:jira-generated-image-static-major-ec83ed56-9a30-42ff-84f2-46af9bb433b4 Major
Reporter: Claude
Description:

BlobStore#listDescendants with S3 receives the size and date of each object from ListObjectsV2 but drops them, so getSize() on a listed blob sends a HeadObject request. Summing the sizes of 100 listed blobs costs 101 requests.

Proposal: the S3 iterator passes size() and lastModified() to the S3Blob it creates, which keeps them as a snapshot; the file system walks with BasicFileAttributes. The listDescendants javadoc would say that the size and date of the returned blobs may be the ones seen during the listing. Depends on the last modification date being part of the API.