Skip to content

Commit

Permalink
MetadataCollection::import(): retry on "deadlock detected" on the ser…
Browse files Browse the repository at this point in the history
…ver side
  • Loading branch information
zozlak committed Aug 30, 2024
1 parent 4fbbbab commit ade6e5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/acdhOeaw/arche/lib/ingest/MetadataCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ function (RepoResource $repoRes) use ($meta, $progress) {
$sleep = false;
foreach ($chunkRepoRes as $n => $j) {
// handle reingestion on "HTTP 409 Conflict"
$conflict = $j instanceof Conflict && preg_match('/Resource [0-9]+ locked|Transaction [0-9]+ locked|Owned by other request|Lock not available/', $j->getMessage());
$conflict = $j instanceof Conflict && preg_match('/Resource [0-9]+ locked|Transaction [0-9]+ locked|Owned by other request|Lock not available|deadlock detected/', $j->getMessage());
$notFound = $j instanceof NotFound;
$networkError = $j instanceof ConnectException;
if ($conflict || $notFound || $networkError) {
Expand Down

0 comments on commit ade6e5e

Please sign in to comment.