Skip to content

Conversation

@provokateurin
Copy link
Member

A unique index must be used to actually guarantee no duplicates, as this method is not even transaction safe (with READ_COMMITTED)

Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
@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 11:35
@provokateurin provokateurin requested review from Altahrim, CarlSchwan, icewind1991 and leftybournes and removed request for a team December 16, 2025 11:35
if ($e->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
$mountPoint = $tmpMountPointName . '-' . $i;
$i++;
continue;
Copy link
Member

Choose a reason for hiding this comment

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

No risk of infinite loop?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but this was already the case before. The sharding tests are running into a timeout on some tests, so that could be related (but I don't see why yet).

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants