Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7343127
D8803.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
749 B
Subscribers
None
D8803.id.diff
View Options
diff --git a/swh/indexer/storage/writer.py b/swh/indexer/storage/writer.py
--- a/swh/indexer/storage/writer.py
+++ b/swh/indexer/storage/writer.py
@@ -50,6 +50,8 @@
if not self.journal:
return
+ translated = []
+
# usually, all the additions in a batch are from the same indexer,
# so this cache allows doing a single query for all the entries.
tool_cache = {}
@@ -65,5 +67,7 @@
entry, tool=tool_cache[tool_id], indexer_configuration_id=None
)
- # write to kafka
- self.journal.write_addition(obj_type, entry)
+ translated.append(entry)
+
+ # write to kafka
+ self.journal.write_additions(obj_type, translated)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 17 2025, 7:34 PM (7 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3229319
Attached To
D8803: journal writer: only flush kafka once per batch
Event Timeline
Log In to Comment