metno / discovery-metadata-catalog-ingestor

Apache License 2.0
1 stars 1 forks source link

file distributor fails when trying to delete an existing mmd file #215

Closed charlienegri closed 9 months ago

charlienegri commented 10 months ago

commands like
curl -X POST https://dmci.s-enda-staging.k8s.met.no/v1/delete/no.met.staging:ddb4c5d1-70b5-4d09-98a8-fadbf5e2d2ba fail with

The following distributors failed: file
 - file: File not found: ddb4c5d1-70b5-4d09-98a8-fadbf5e2d2ba.xml

when trying to delete existing files

on the top of this, some files that are in the mmd-xml-staging repo appear not to be ingested (this might be fixed by a rebuild but no idea why it happened) e.g. curl -X POST https://dmci.s-enda-staging.k8s.met.no/v1/delete/no.met.staging:043aa5eb-d0ac-4dde-8da2-33e318e8dd65 gives

The following distributors failed: file, pycsw, solr
 - file: File not found: 043aa5eb-d0ac-4dde-8da2-33e318e8dd65.xml
 - pycsw: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- pycsw 2.7.dev0 -->
<csw:TransactionResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.2" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-publication.xsd"><csw:TransactionSummary><csw:totalInserted>0</csw:totalInserted><csw:totalUpdated>0</csw:totalUpdated><csw:totalDeleted>0</csw:totalDeleted></csw:TransactionSummary></csw:TransactionResponse>
 - solr: Document no.met.staging:043aa5eb-d0ac-4dde-8da2-33e318e8dd65 not found in index.
charlienegri commented 10 months ago

update 22 Jan:
I could delete and re-ingest correctly for example the file with UUID 8a6928df-0644-4e2a-b023-af7cbdb7c567 curl -X POST https://dmci.s-enda-staging.k8s.met.no/v1/delete/no.met.staging:8a6928df-0644-4e2a-b023-af7cbdb7c567 (--> Everything is OK) curl --data-binary @arch_f/arch_d/arch_8/8a6928df-0644-4e2a-b023-af7cbdb7c567.xml https://dmci.s-enda-staging.k8s.met.no/v1/insert (--> Everything is OK)

but when I try for example curl -X POST https://dmci.s-enda-staging.k8s.met.no/v1/delete/no.met.staging:ddb4c5d1-70b5-4d09-98a8-fadbf5e2d2ba it still fails with

The following distributors failed: file
 - file: File not found: ddb4c5d1-70b5-4d09-98a8-fadbf5e2d2ba.xml

the file is in the repo as arch_1/arch_d/arch_5/ddb4c5d1-70b5-4d09-98a8-fadbf5e2d2ba.xml

mortenwh commented 10 months ago

It turns out this is most likely related to the changes in git-periodic-pusher. We will revert those changes, so then I hope this issue should be solved.

mortenwh commented 10 months ago

solved!

mortenwh commented 10 months ago

in principle it needs to be tested at least an hour after rebuilding the catalog (in dev)

mortenwh commented 9 months ago

it seems to work now