Skip to content
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

Prevent causal read for outbox message and recipient inserts #6464

Merged

Conversation

ChristophWurst
Copy link
Member

The message and the recipients are inserted in one transaction but the
recipients are read another time outside a transaction. Read-write split
database clusters might not be in full sync mode and then reading the
recipients gives partial or no results.

The insert will assign the primary key value to the recipient entities.
Therefore we can skip reading the data.

Ref nextcloud/groupware#24

@ChristophWurst
Copy link
Member Author

/backport to stable1.12

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

The message and the recipients are inserted in one transaction but the
recipients are read another time outside a transaction. Read-write split
database clusters might not be in full sync mode and then reading the
recipients gives partial or no results.

The insert will assign the primary key value to the recipient entities.
Therefore we can skip reading the data.

Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst ChristophWurst force-pushed the fix/outbox-message-insert-recipients-causal-read branch from b3a0d61 to 8d49748 Compare May 23, 2022 07:02
@ChristophWurst ChristophWurst added this to the v1.13.0 milestone May 23, 2022
@ChristophWurst ChristophWurst merged commit 28d6109 into main May 23, 2022
@ChristophWurst ChristophWurst deleted the fix/outbox-message-insert-recipients-causal-read branch May 23, 2022 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants