Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@provokateurin
Copy link
Member

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.

@provokateurin provokateurin added this to the Nextcloud 33 milestone Dec 16, 2025
@provokateurin provokateurin requested a review from a team as a code owner December 16, 2025 08:08
@provokateurin provokateurin added bug 3. to review Waiting for reviews labels Dec 16, 2025
@provokateurin provokateurin requested review from Altahrim, leftybournes, salmart-dev and yemkareems and removed request for a team December 16, 2025 08:08
This was referenced Jan 7, 2026
This was referenced Jan 14, 2026
}
} else {
// No changes were made, but we still need to get rid of the transaction
$this->connection->rollBack();
Copy link
Member

Choose a reason for hiding this comment

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

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

@icewind1991
Copy link
Member

I'm a bit hesitant of this causing locking issues

@provokateurin
Copy link
Member Author

That could happen indeed. How about merging it for 34 only and reverting it later, if it actually causes problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants