mattermost / mattermost-plugin-msteams

Other
12 stars 10 forks source link

Remove FOR UPDATE from read-only transactions #676

Closed lieut-data closed 1 month ago

lieut-data commented 1 month ago

Summary

In the past, we relied on transactions at the application layer, and had embedded FOR UPDATE additions to various queries in support of same. This stopped working once we added support for read replicas and marked these APIs with db:withReplica. But notably, this was only an issue when a read replica is actually setup and the database enforces read-only semantics.

Since we stopped using transactions this way, these FOR UPDATE additions are redundant and can simply be removed.

CleanShot 2024-05-28 at 12 24 45@2x

Ticket Link

None.