Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/private/Files/Cache/Propagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function propagateChange(string $internalPath, int $time, int $sizeDiffer
}

$parentHashes = array_map('md5', $parents);
sort($parentHashes); // Ensure rows are always locked in the same order
$etag = uniqid(); // since we give all folders the same etag we don't ask the storage for the etag

$builder = $this->connection->getQueryBuilder();
Expand Down Expand Up @@ -160,6 +161,9 @@ public function commitBatch(): void {
}
$this->inBatch = false;

// Ensure rows are always locked in the same order
uasort($this->batch, static fn (array $a, array $b) => $a['hash'] <=> $b['hash']);

try {
$this->connection->beginTransaction();

Expand Down
Loading