Bug #2838
closedSearch "soil" in metacat causes an exception
0%
Description
After release 1.7, we made some changes in metacat search part. I found search "datos" caused an exception:
[ERROR]: Exception in DBQuery.findDocuments: null [edu.ucsb.nceas.metacat.DBQuery]
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
at java.util.AbstractList$Itr.next(AbstractList.java:420)
at edu.ucsb.nceas.metacat.DBQuery.addRelationship(DBQuery.java:1249)
at edu.ucsb.nceas.metacat.DBQuery.handleSubsetResult(DBQuery.java:844)
at edu.ucsb.nceas.metacat.DBQuery.findResultDoclist(DBQuery.java:760)
at edu.ucsb.nceas.metacat.DBQuery.createResultDocument(DBQuery.java:410)
at edu.ucsb.nceas.metacat.DBQuery.findDocuments(DBQuery.java:307)
at edu.ucsb.nceas.metacat.DBQuery.findDocuments(DBQuery.java:234)
at edu.ucsb.nceas.metacat.MetaCatServlet.handleQuery(MetaCatServlet.java:1096)
at edu.ucsb.nceas.metacat.MetaCatServlet.handleGetOrPost(MetaCatServlet.java:644)
at edu.ucsb.nceas.metacat.MetaCatServlet.doPost(MetaCatServlet.java:294)
I digged around and found the problem was that there were duplicate docids in DocumentResutlSet object and it caused to remove docid (key) from a hashtable mutiple times, which only had one key for a docid. The reason the object had duplicated docids was the back tracing process didn't get rid of the duplicated docids. I fixed the problem and search "datos" works.
However, search "soil" and other stuff still bring the exception. We need to fix it.