Repository navigation
fix(databases): build transaction delete events from the stored document - #14781
Conversation
Staged delete operations carry no data of their own, so the event published on commit must reflect the row that was removed. Reject data on staged deletes and always load the stored document at commit.
|
Review complete. No blocking issues — approved ✅; 3 nitpicks below. 🧹 Nitpicks (3) — 🟢 3 low
The change tightens the transaction operations contract:
Reviewed commit: 42b419e |
🟢 Tier S · Ready to mergeThe shared transaction operation validator now rejects delete operations with non-empty data. Transaction commits load the stored document for deletes and use it as the event payload, with E2E coverage for validation and webhook payloads.
📂 Walkthrough · 3
Reviewed |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
…e-event fix(databases): build transaction delete events from the stored document (cherry picked from commit fadc04d)
What
dataondeleteoperations (applies to the legacy, TablesDB, DocumentsDB and VectorsDB operation routes, which share the validator).data, when present, was used as the event payload instead.Why
Delete events should describe the row that was actually removed. Staged deletes never need data, and the per-row delete route already stages
data: [].Tests
TransactionsBase::testCommitDeleteEventPayloadUsesStoredRecord(runs for legacy, TablesDB and DocumentsDB transaction suites): staging a delete with data returns 400; staging a delete without data and committing delivers a delete webhook whose payload matches the stored record (name and permissions).E2E was not run locally (shared machine); relying on the CI e2e lanes. Pint, PHPStan and Rector pass for the touched files.
Related: appwrite-labs/cloud#6673