From 82955637e6ed2941eef9d223b59ecb1bc8dbc74a Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 29 Oct 2009 13:32:57 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 4 ++++ .../solr/update/processor/LogUpdateProcessorFactory.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index db7743e1838..728460dd04f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -638,6 +638,10 @@ Bug Fixes is attempted only once the first time an admin page is loaded. (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 ---------------------- 1. Upgraded to Lucene 2.4.0 (yonik) diff --git a/src/java/org/apache/solr/update/processor/LogUpdateProcessorFactory.java b/src/java/org/apache/solr/update/processor/LogUpdateProcessorFactory.java index 55e7732470d..563981d1bd8 100644 --- a/src/java/org/apache/solr/update/processor/LogUpdateProcessorFactory.java +++ b/src/java/org/apache/solr/update/processor/LogUpdateProcessorFactory.java @@ -161,10 +161,10 @@ class LogUpdateProcessor extends UpdateRequestProcessor { // be logged by SolrCore // if id lists were truncated, show how many more there were - if (numAdds > maxNumToLog) { + if (adds != null && numAdds > maxNumToLog) { adds.add("... (" + adds.size() + " added)"); } - if (numDeletes > maxNumToLog) { + if (deletes != null && numDeletes > maxNumToLog) { deletes.add("... (" + deletes.size() + " removed)"); } long elapsed = rsp.getEndTime() - req.getStartTime();