Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163484
D694.id2179.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1011 B
Subscribers
None
D694.id2179.diff
View Options
diff --git a/swh/storage/storage.py b/swh/storage/storage.py
--- a/swh/storage/storage.py
+++ b/swh/storage/storage.py
@@ -224,6 +224,11 @@
def content_get(self, content):
"""Retrieve in bulk contents and their data.
+ This generator yields exactly as many items than provided sha1
+ identifiers, but callers should not assume this will always be true.
+
+ It may also yield `None` values in case an object was not found.
+
Args:
content: iterables of sha1
@@ -256,6 +261,10 @@
def content_get_range(self, start, end, limit=1000, db=None, cur=None):
"""Retrieve contents within range [start, end] bound by limit.
+ Note that this function may return more than one blob per hash. The
+ limit is enforced with multiplicity (ie. two blobs with the same hash
+ will only count twice).
+
Args:
**start** (bytes): Starting identifier range (expected smaller
than end)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 8:59 AM (20 h, 29 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3232125
Attached To
D694: Document edge cases of content_get_range.
Event Timeline
Log In to Comment