Skip to content

docs: note bulk-write transactions and callbacks=false in the app guide - #4386

Merged
bpamiri merged 2 commits into
developfrom
peter/consumer-docs-bulk-callbacks
Oct 5, 2026
Merged

bpamiri merged 2 commits into
developfrom
peter/consumer-docs-bulk-callbacks

Conversation

@bpamiri

@bpamiri bpamiri commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

This follows up #4377 now that two behaviour fixes have landed. It touches docs/consumer-ai/.ai/models.md and its wheels new template copy.

Checked against vendor/wheels/model/bulk.cfm and callbacks.cfm on develop (eb99bc9).

Verification

  • tools/build/scripts/ship-consumer-docs.sh check passes, and the template copy is byte-identical.

🤖 Generated with Claude Code

insertAll() / upsertAll() now run a call's batches in one transaction
(#4367), and save()/delete() with callbacks=false skip afterCommit and
afterRollback (#4378).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>
@bpamiri bpamiri added this to the v4.2.0 milestone Oct 5, 2026
@github-actions github-actions Bot added the docs label Oct 5, 2026
@bpamiri

bpamiri commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Review: head 218998e. APPROVE (docs).

I checked each line against origin/develop (eb99bc9, with #4367 and #4378 merged). Both .ai/models.md copies are byte-identical.

  • One transaction per call. insertAll / upsertAll default transaction to $get("transactionMode") and run their batches through invokeWithTransaction (bulk.cfm:23,41,49 and :123,190,200). So a failing batch rolls back the earlier ones, a nested call joins the open transaction (pinned by bulkTransactionSpec's nesting case), none leaves each batch to auto-commit, and rollback keeps nothing. Accurate.
  • "Up to 1000, fewer on SQL Server." $bulkBatchSize returns 1000 unless $maxBoundParameters() is above 0 and the call is parameterized. Only MicrosoftSQLServerModel overrides the base's 0 (with 2097). Accurate, and it closes my docs: cover soft delete, dependents, bulk writes, channels and upgrades in the app guide #4377 INFO about the 1000-row line.
  • callbacks=false skips afterCommit / afterRollback. That matches fix(model): skip commit callbacks when callbacks = false #4378 ($enqueueTransactionCallbacks(..., callbacks=false) goes to the restore-only queue entry), and the bullet sits in the right section (afterCommit / afterRollback details).

PR CI at review time: 1 pass, 13 pending, 2 skipping. The final follows once it is green.

There is no transaction() function. Say where a bulk call joins an open
transaction, and that its default comes from transactionMode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>
@bpamiri
bpamiri merged commit 18dde9f into develop Oct 5, 2026
25 of 30 checks passed
@bpamiri
bpamiri deleted the peter/consumer-docs-bulk-callbacks branch October 5, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant