Project

General

Profile

« Previous | Next » 

Revision 7433

remove document from the indexing queue when delete is called. http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5750

View differences:

DocumentImpl.java
2920 2920
            	IndexingQueue.getInstance().add(docid, rev);
2921 2921
        }
2922 2922
    }
2923
    
2924
    private static void removeDocidFromIndexingQueue(String docid, String rev) throws PropertyNotFoundException {
2925
        boolean useXMLIndex =
2926
            (new Boolean(PropertyService.getProperty("database.usexmlindex"))).booleanValue();
2927
        if (useXMLIndex) {
2928
            	IndexingQueue.getInstance().remove(docid, rev);
2929
        }
2930
    }
2923 2931

  
2924 2932
    /**
2925 2933
     * Write an XML file to the database during replication
......
3309 3317
            double afterArchiveDocAndNode = System.currentTimeMillis()/1000;
3310 3318
            logMetacat.info("DocumentImpl.delete - The time for archiveDocAndNodesRevision is "+(afterArchiveDocAndNode - start));
3311 3319
            
3320
            // make sure we don't have a pending index task
3321
            removeDocidFromIndexingQueue(docid, String.valueOf(rev));
3322
            
3312 3323
            // Now delete it from the xml_index table
3313 3324
            pstmt = conn.prepareStatement("DELETE FROM xml_index WHERE docid = ?");
3314 3325
            pstmt.setString(1, docid);

Also available in: Unified diff