Page MenuHomeSoftware Heritage

D8803.id.diff
No OneTemporary

D8803.id.diff

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

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

Event Timeline