Skip to content

Commit 3363f7f

Browse files
authored
Merge pull request #98 from ArcadeData/docs/graph-batch-churn-docstring
Docs: graph_batch docstrings name the churn limitation
2 parents d5930ae + 8596d59 commit 3363f7f

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎src/arcadedb/_native/database.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,16 @@ def graph_batch(self, **options):
889889
"""A GraphBatch for bulk graph loads (keywords as :meth:`Database.graph_batch`). ``commit_every`` defaults to 1000 on this build
890890
(the JVM build leaves it unset: one commit per flush); ``commit_every=0`` gives one commit per flush here too, and an explicit value
891891
wins. It is also the number of rows ``create_vertices`` sends, and commits, per call into the image.
892+
893+
Note:
894+
``graph_batch()`` is recommended for bulk loads. When it is called again and
895+
again on types that also see deletes (a sliding window, for example), each
896+
flush writes its edge records onto new pages and never reuses the space
897+
that deletes freed, so the edge bucket grows (ArcadeData/arcadedb#10746).
898+
For that workload write the edges with SQL ``CREATE EDGE``, or
899+
``Vertex.new_edge`` inside ``db.transaction()``. See "Known limitation:
900+
graph batches next to deletes" in
901+
docs/modules/ROOT/pages/how-to/bulk-loads.adoc.
892902
"""
893903
from .extras import NativeGraphBatch
894904

‎src/arcadedb/core.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,16 @@ def graph_batch(
20042004
flush through the same executor and is measured exact, 20,000 vertices
20052005
and 40,000 edges with and without ``parallel_flush``.
20062006
2007+
Note:
2008+
``graph_batch()`` is recommended for bulk loads. When it is called again and
2009+
again on types that also see deletes (a sliding window, for example), each
2010+
flush writes its edge records onto new pages and never reuses the space
2011+
that deletes freed, so the edge bucket grows (ArcadeData/arcadedb#10746).
2012+
For that workload write the edges with SQL ``CREATE EDGE``, or
2013+
``Vertex.new_edge`` inside ``db.transaction()``. See "Known limitation:
2014+
graph batches next to deletes" in
2015+
docs/modules/ROOT/pages/how-to/bulk-loads.adoc.
2016+
20072017
Args:
20082018
batch_size: Maximum buffered edges before auto-flush.
20092019
expected_edge_count: Hint for auto-tuning batch size when not set.

0 commit comments

Comments
 (0)