isamplesorg / isamples_inabox

Provides functionality intermediate to a collection and central
0 stars 1 forks source link

Possibility for deleted SESAR records #112

Open dannymandel opened 2 years ago

dannymandel commented 2 years ago

In the process of spinning up iSamples Central, we noticed an odd record count for SESAR. On investigation, it turns out that one of the samples from SESAR had been deleted. These are the details:

number of igsns from db is 4583993
number of igsns from solr is 4583992
Difference between db and solr is {'IGSN:URI000986'}

on investigating the record in the db, it looks like this:

isb_2=> select * from thing where id='IGSN:URI000986';
       id       |            tstamp             |        tcreated        | item_type | authority_id | related | log |                            resolved_url                             | resolved_status |           tresolved           | resolve_elapsed |                                                                                                                                                                                         resolved_content                                                                                                                                                                                         | resolved_media_type |   _id   | authority_id_int 
----------------+-------------------------------+------------------------+-----------+--------------+---------+-----+---------------------------------------------------------------------+-----------------+-------------------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------+------------------
 IGSN:URI000986 | 2021-08-11 15:15:51.062652-07 | 2008-03-23 17:00:00-07 | sample    | SESAR        | null    |     | https://api.geosamples.org/v1/sample/igsn-ev-json-ld/igsn/URI000986 |             200 | 2021-08-13 00:17:42.236849-07 |        0.269449 | {"@id": "https://data.geosamples.org/sample/igsn/URI000986", "igsn": "URI000986", "@context": "https://raw.githubusercontent.com/IGSN/igsn-json/master/schema.igsn.org/json/registration/v0.1/context.jsonld", "registrant": {"name": "IEDA", "identifiers": {"id": "https://www.geosamples.org", "kind": "uri"}}, "description": {"igsnPrefix": "URI", "description": "The sample is deleted"}} | application/ld+json | 5804550 |   

The deleted record JSON looks like this:

{
    "@id": "https://data.geosamples.org/sample/igsn/URI000986",
    "igsn": "URI000986",
    "@context": "https://raw.githubusercontent.com/IGSN/igsn-json/master/schema.igsn.org/json/registration/v0.1/context.jsonld",
    "registrant": {
        "name": "IEDA",
        "identifiers": {
            "id": "https://www.geosamples.org",
            "kind": "uri"
        }
    },
    "description": {
        "igsnPrefix": "URI",
        "description": "The sample is deleted"
    }
}

What should we do when we encounter a record like this?

dannymandel commented 1 year ago

Still an issue.