SOLR-1529: many deleteByQyery in same request can cause NPE

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@830936 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2009-10-29 13:32:57 +00:00
parent 3537dad904
commit 82955637e6
2 changed files with 6 additions and 2 deletions

View File

@ -638,6 +638,10 @@ Bug Fixes
is attempted only once the first time an admin page is loaded. is attempted only once the first time an admin page is loaded.
(hossman) (hossman)
75. SOLR-1529: More than 8 deleteByQuery commands in a single request
caused an error to be returned, although the deletes were
still executed. (asmodean via yonik)
Other Changes Other Changes
---------------------- ----------------------
1. Upgraded to Lucene 2.4.0 (yonik) 1. Upgraded to Lucene 2.4.0 (yonik)

View File

@ -161,10 +161,10 @@ class LogUpdateProcessor extends UpdateRequestProcessor {
// be logged by SolrCore // be logged by SolrCore
// if id lists were truncated, show how many more there were // if id lists were truncated, show how many more there were
if (numAdds > maxNumToLog) { if (adds != null && numAdds > maxNumToLog) {
adds.add("... (" + adds.size() + " added)"); adds.add("... (" + adds.size() + " added)");
} }
if (numDeletes > maxNumToLog) { if (deletes != null && numDeletes > maxNumToLog) {
deletes.add("... (" + deletes.size() + " removed)"); deletes.add("... (" + deletes.size() + " removed)");
} }
long elapsed = rsp.getEndTime() - req.getStartTime(); long elapsed = rsp.getEndTime() - req.getStartTime();