Closed LordFlashmeow closed 3 years ago
Hi @LordFlashmeow
Thanks for pointing this out. We are 2-3 months from the initial public beta release of Symbiota2, so most of our development efforts are currently focused there. Symbiota2 will likely use ElasticSearch rather than SOLR for indexing.
I actually ran into this issue as well and updated the SOLR config for scan-bugs.org with something similar. Hopefully this can fix the issue for now?
Unfortunately we don't have the bandwidth right now to support both Symbiota & the development of Symbiota2. But thanks again for your interest!
-Evin
@LordFlashmeow what Symbiota portal are you working on?
-Neil
@neilcobb monarch.calacademy.org
@LordFlashmeow I just committed a patch to the solr deltaQuery that should fix the issue. Unfortunately you'll have to transfer the patched code into the active data-config.xml file in your solr core, but once done this issue should be gone.
Thanks! We're running solr as a docker service so it's pretty easy to update it.
The solr deltaQuery gets the ids of updated records since the last import and expects all images to have an
occid
associated and breaks if one of them doesn't.As you can see here, the query gets a list of the
occid
for new images and theoccid
for new occurrences.https://github.com/Symbiota/Symbiota/blob/eac45700beddf1d84e2930da1054fd558e0ed4da/config/solr/data-config.xml#L36-L37
However, an image's occid is allowed to be null. When dataImport tries to find the primary key associated with the occid, it fails because the value is null, raising this error:
o.a.s.h.d.DataImporter Delta Import Failed => java.lang.RuntimeException: java.lang.IllegalArgumentException: deltaQuery returned a row with null for primary key occid
https://github.com/Symbiota/Symbiota/blob/eac45700beddf1d84e2930da1054fd558e0ed4da/config/schema-1.0/utf8/db_schema-1.0.sql#L1035-L1067
Steps to reproduce
If you connect to the sql database, you can verify that the occid is null.
If you then edit the image and add it to an occurrence record, the dataimport will work fine.
Possible solutions:
SELECT occid FROM images i WHERE (i.occid IS NOT NULL AND i.InitialTimeStamp > CONVERT_TZ('${dih.last_index_time}','+00:00','-06:00'))