Skip to content

Commit d9fe917

Browse files
committed
chore(changeset): the afterUpdate arm's post-next() timing is a change since 18.0.0, not since forever
The door-level unit for a blocking or conditioned metadata afterUpdate hook first shipped in objectql 18.0.0 (17.7.0 has no opensAfterAbortUnit), so the note says 18.0.0 through 18.6.0 rather than every earlier release. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbXGvw43spR79ztEvWt
1 parent 99c200d commit d9fe917

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.changeset/35142-claim-race-loser-409.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ The stored owner was always right; only the loser's answer was wrong.
1616

1717
The cause: the unit exists so that a refusal later in the write rolls back what the write's hooks wrote through `ctx.api`, the row included. That unit opened around the whole update, the authorization middleware included. On SQLite the second writer then waited for the first one's commit before its authorization gate read the record, and by then the record belonged to someone else. The unit now opens around the engine body only: the middleware runs before it, as it does for an update that opens no unit, and the hooks, the row write and the `after*` chain still run inside it and still roll back together.
1818

19-
What a middleware does after `next()` on such an update now runs after the commit, as it does on an object with no metadata update hook. For the `beforeUpdate` case that is how 18.5.0 behaved. For the `afterUpdate` case it is a change from every earlier release, where that code ran inside the unit.
19+
What a middleware does after `next()` on such an update now runs after the commit, as it does on an object with no metadata update hook. For the `beforeUpdate` case that is how 18.5.0 behaved. For the `afterUpdate` case it is not a return to an earlier release: from 18.0.0, when that unit first shipped, through 18.6.0 that code ran inside the unit.
2020

2121
Nothing to change in an app.

0 commit comments

Comments
 (0)