perf(UserMountCache): Start transaction earlier to prevent unnecessary queries#57117
Open
provokateurin wants to merge 1 commit intomasterfrom
Open
perf(UserMountCache): Start transaction earlier to prevent unnecessary queries#57117provokateurin wants to merge 1 commit intomasterfrom
provokateurin wants to merge 1 commit intomasterfrom
Conversation
…y queries Signed-off-by: provokateurin <[email protected]>
Merged
CarlSchwan
approved these changes
Jan 27, 2026
CarlSchwan
reviewed
Jan 27, 2026
| } | ||
| } else { | ||
| // No changes were made, but we still need to get rid of the transaction | ||
| $this->connection->rollBack(); |
Member
There was a problem hiding this comment.
it might make sense to add the whole thing in a try catch block to make sure that in any case rollback will be executed
Member
|
I'm a bit hesitant of this causing locking issues |
Member
Author
|
That could happen indeed. How about merging it for 34 only and reverting it later, if it actually causes problems? |
This was referenced Jan 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because the SELECTs are not happening in the transaction, a competing request might have updated the oc_mounts already and the INSERT/DELETE/UPDATE queries are not necessary anymore. Starting the transaction before the SELECTs happen, removes these queries.