Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

bindings docs: schema statements apply immediately; batch many in one transaction (#21) - #22

Merged
tae898 merged 1 commit into
mainfrom
docs/schema-applies-immediately
Sep 29, 2026
Merged

tae898 merged 1 commit into
mainfrom
docs/schema-applies-immediately

Conversation

@tae898

@tae898 tae898 commented Sep 29, 2026

Copy link
Copy Markdown

Closes #21.

What changed

  • docs/api/schema.md: the "Auto-Transactional" note and best practice 1 (which marked wrapping in a transaction as unnecessary) now say what upstream confirmed on Schema changes cost 20 to 100 ms each on disk (10 to 40 times tmpfs): about 150 ms per type with one property and one index ArcadeData/arcadedb#8635: a schema statement takes effect at once and a rollback does not undo it, and many are batched in one transaction or one sqlscript so the schema is written once.
  • docs/guide/core/transactions.md: the section is renamed "Schema statements apply immediately", explains the batching and the crash behaviour Luca described, and gains a ten-type example.
  • docs/api/transactions.md: the table row and the db.command() paragraph say the same; the vector-index row keeps its "do not wrap" advice with the new wording.
  • 50 comments across tests, examples, and doc code blocks: "auto-transactional" becomes "apply immediately". The two HTTP statements ("HTTP commands are auto-transactional per request") are a different, correct claim and stay.
  • tests/test_schema_batching.py (2 tests) with its page, overview row, and nav entry.

How it was verified

  • The two tests pass against the installed wheel (de966e79c5, before fix(#8635): write the schema once per DDL statement, never mid-transaction ArcadeData/arcadedb#8657): the behaviour they pin did not change with the fix.
  • pre-commit on the changed files, bandit with CI's settings on the new test (no issues), and mkdocs build --strict (clean).
  • The measurement behind the advice (.notes/bench/repros/ddl-cost/, published snapshot 66a82a8fd0, Temurin 25 / 21, on disk): 30 types with a property and an index in one transaction cost 3.30 / 3.13 ms per type, against 44.86 / 44.16 before the fix; a standalone CREATE DOCUMENT TYPE costs 14.57 / 15.00 ms.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr

…ctional; batch many in one transaction (#21)

Upstream's answer on ArcadeData#8635. Adds tests/test_schema_batching.py.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr
@tae898
tae898 merged commit aeefada into main Sep 29, 2026
48 checks passed
@tae898
tae898 deleted the docs/schema-applies-immediately branch September 29, 2026 18:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

1 participant