Uploaded image for project: 'Portal'
  1. Portal
  2. POR-3060

Backbone ids not stable after builds

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Checklistbank
    • Labels:

      Description

      When a new backbone is built we must try hard to keep usage keys stable.
      We use the canonical name, rank, kingdom and authorship to match to a previously existing usage, even if it was deleted before (we would then resurrect the id).

      In case there are undistinguishable usages the IdGenerator fails and just creates a new identifier instead of picking one of the existing according to some rule. For example the following existing usages cause problems:

      3241527, Rank.GENUS, Kingdom.ANIMALIA, "Cardinalis Bonaparte, 1838
      2490383, Rank.GENUS, Kingdom.ANIMALIA, "Cardinalis Bonaparte, 1831
      3232102, Rank.GENUS, Kingdom.PLANTAE, "Cardinalis Fabricius, 1759
      2490384, Rank.SPECIES, Kingdom.ANIMALIA, "Cardinalis cardinalis (Linnaeus, 1758)
      4846779, Rank.SPECIES, Kingdom.ANIMALIA, "Cardinalis cardinalis (Linnaeus, 1758)
      

      The genus Cardinalis Bonaparte and the species Cardinalis cardinalis (Linnaeus, 1758) are currently conflated and for both a new id is generated.

        Gliffy Diagrams

        Issue Links

          Activity

          Hide
          Markus Döring added a comment -

          In total we have 950.341 new ids and 315.931 deleted ones

          Show
          Markus Döring added a comment - In total we have 950.341 new ids and 315.931 deleted ones
          Hide
          Markus Döring added a comment -

          idlookup now tries an exact match first. and if we still have multiple ambigous matches it selects the oldest=lowest id to stay

          https://github.com/gbif/checklistbank/commit/06f6039ef0772730a6d1d37abc6ee9de8e92251f

          Show
          Markus Döring added a comment - idlookup now tries an exact match first. and if we still have multiple ambigous matches it selects the oldest=lowest id to stay https://github.com/gbif/checklistbank/commit/06f6039ef0772730a6d1d37abc6ee9de8e92251f
          Hide
          Markus Döring added a comment - - edited

          lates nub has right ids:

           3241527 | GENUS | ACCEPTED | Cardinalis                 | 
           2490383 | GENUS | ACCEPTED | Cardinalis Bonaparte, 1831 | 2016-03-11 02:30:37.803967
           3232102 | GENUS | DOUBTFUL | Cardinalis Fabricius, 1759 | 
           8245481 | GENUS | DOUBTFUL | Cardinalis Jarocki, 1821   | 
           7635491 | GENUS | DOUBTFUL | Cardinalis Rupp.           | 
          

          Author is still missing

             id    |  rank   |  status  |            scientific_name             |          deleted          
          ---------+---------+----------+----------------------------------------+---------------------------
           4846779 | SPECIES | ACCEPTED | Cardinalis cardinalis (Linnaeus, 1758) | 2016-03-11 02:32:20.04576
           2490384 | SPECIES | ACCEPTED | Cardinalis cardinalis (Linnaeus, 1758) | 
          
          Show
          Markus Döring added a comment - - edited lates nub has right ids: 3241527 | GENUS | ACCEPTED | Cardinalis | 2490383 | GENUS | ACCEPTED | Cardinalis Bonaparte, 1831 | 2016-03-11 02:30:37.803967 3232102 | GENUS | DOUBTFUL | Cardinalis Fabricius, 1759 | 8245481 | GENUS | DOUBTFUL | Cardinalis Jarocki, 1821 | 7635491 | GENUS | DOUBTFUL | Cardinalis Rupp. | Author is still missing id | rank | status | scientific_name | deleted ---------+---------+----------+----------------------------------------+--------------------------- 4846779 | SPECIES | ACCEPTED | Cardinalis cardinalis (Linnaeus, 1758) | 2016-03-11 02:32:20.04576 2490384 | SPECIES | ACCEPTED | Cardinalis cardinalis (Linnaeus, 1758) |

            People

            • Assignee:
              Markus Döring
              Reporter:
              Markus Döring
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: