-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dav): Fix atomic addressbook update #43903
Conversation
Sabre executes the proppatch callback *after* calling updateAddressbook and not synchronously. That means the code inside the callback was run outside a database transaction. This moves the atomic helper into the callback to create the expected transaction span. Signed-off-by: Christoph Wurst <[email protected]>
$updates['description'] = $newValue; | ||
break; | ||
} | ||
$propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) { |
Check notice
Code scanning / Psalm
MissingClosureParamType Note
return true; | ||
}); | ||
}, $this->db); | ||
$this->dispatcher->dispatchTyped(new AddressBookUpdatedEvent((int)$addressBookId, $addressBookRow, $shares, $mutations)); |
Check notice
Code scanning / Psalm
PossiblyNullArgument Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Sabre executes the proppatch callback after calling updateAddressbook and not synchronously. That means the code inside the callback was run outside a database transaction. This moves the atomic helper into the callback to create the expected transaction span.
A fine detail we have missed in #36528.
We probably have to check the CalDAV backend too.#43904tl;dr: see https://github.com/nextcloud/server/pull/43903/files?w=1
Checklist