Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9345879
D2845.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2845.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
@@ -192,7 +192,9 @@
contents = [attr.evolve(c, ctime=now) for c in content]
missing = list(self.content_missing(
- map(Content.to_dict, contents), key_hash='sha1_git'))
+ map(Content.to_dict, contents), key_hash='sha1_git',
+ db=db, cur=cur,
+ ))
contents = [c for c in contents if c.sha1_git in missing]
self.journal_writer.content_add(contents)
@@ -243,7 +245,9 @@
db=None, cur=None) -> Dict:
contents = list(content)
missing = self.content_missing(
- (c.to_dict() for c in contents), key_hash='sha1_git')
+ (c.to_dict() for c in contents), key_hash='sha1_git',
+ db=db, cur=cur,
+ )
contents = [c for c in contents if c.sha1_git in missing]
self.journal_writer.content_add_metadata(contents)
@@ -414,7 +418,9 @@
content = [attr.evolve(c, ctime=now) for c in content]
missing_contents = self.skipped_content_missing(
- c.to_dict() for c in content)
+ (c.to_dict() for c in content),
+ db=db, cur=cur,
+ )
content = [c for c in content
if any(all(c.get_hash(algo) == missing_content.get(algo)
for algo in DEFAULT_ALGORITHMS)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:34 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221661
Attached To
D2845: Don't nest transactions in content_add/skipped_content_add
Event Timeline
Log In to Comment