Fix crash when RawExtrinsicMetadata target new origins
Closed
requested to merge generated-differential-D8392-source into generated-differential-D8392-target
RawExtrinsicMetadata contain a swh:1:ori: identifier of the origin, which the indexer needs to resolve, by querying its storage replica.
Because RawExtrinsicMetadata are created by loaders, they are often created shortly after the origin is created by the corresponding lister, so the origin may not be known to the storage replica used by the indexer, causing this function to crash.
Waiting 10s seems to be good enough when run on my computer with production data and moma's replica; so I set it to 60s just to be safe.
Migrated from D8392 (view on Phabricator)
Merge request reports
Activity
Build is green
Patch application report for D8392 (id=30285)
Could not rebase; Attempt merge onto 44879ab5...
Updating 44879ab..befdbd7 Fast-forward swh/indexer/metadata.py | 34 ++++++++++++++++++++++++---------- swh/indexer/tests/test_metadata.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 10 deletions(-)
Changes applied before test
commit befdbd7efd46dd052b8728215deeeb3f775c34d0 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Mon Sep 5 15:48:40 2022 +0200 Fix crash when RawExtrinsicMetadata target new origins RawExtrinsicMetadata contain a swh:1:ori: identifier of the origin, which the indexer needs to resolve, by querying its storage replica. Because RawExtrinsicMetadata are created by loaders, they are often created shortly after the origin is created by the corresponding lister, so the origin may not be known to the storage replica used by the indexer, causing this function to crash. Waiting 10s seems to be good enough when run on my computer with production data and moma's replica; so I set it to 60s just to be safe. commit 68940cfccfed258620cc116bedd6598fd9b28df4 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Mon Sep 5 14:21:50 2022 +0200 Fix crash when RawExtrinsicMetadata objects have the same target ... and they are processed in the same batch. The last one received takes precedence, as it is likely to be more up-to-date
See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/481/ for more details.
Please register or sign in to reply