mirror of https://github.com/apache/lucene.git
SOLR-2492 -- DIH does not commit if only deletes are processed
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1145925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e198e8caf
commit
dddbb9c0a0
|
@ -14,7 +14,10 @@ $Id$
|
|||
|
||||
================== 3.4.0-dev ==============
|
||||
|
||||
Bug Fixes
|
||||
----------------------
|
||||
* SOLR-2644: When using threads=2 the default logging is set too high (Bill Bell via shalin)
|
||||
* SOLR-2492: DIH does not commit if only deletes are processed (James Dyer via shalin)
|
||||
|
||||
================== 3.3.0 ==================
|
||||
|
||||
|
|
|
@ -703,9 +703,11 @@ public class DocBuilder {
|
|||
Collection collection = (Collection) value;
|
||||
for (Object o : collection) {
|
||||
writer.deleteDoc(o.toString());
|
||||
importStatistics.deletedDocCount.incrementAndGet();
|
||||
}
|
||||
} else {
|
||||
writer.deleteDoc(value);
|
||||
importStatistics.deletedDocCount.incrementAndGet();
|
||||
}
|
||||
}
|
||||
value = arow.get("$deleteDocByQuery");
|
||||
|
@ -714,9 +716,11 @@ public class DocBuilder {
|
|||
Collection collection = (Collection) value;
|
||||
for (Object o : collection) {
|
||||
writer.deleteByQuery(o.toString());
|
||||
importStatistics.deletedDocCount.incrementAndGet();
|
||||
}
|
||||
} else {
|
||||
writer.deleteByQuery(value.toString());
|
||||
importStatistics.deletedDocCount.incrementAndGet();
|
||||
}
|
||||
}
|
||||
value = arow.get("$docBoost");
|
||||
|
|
|
@ -225,6 +225,16 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
|
|||
assertTrue("Update request processor processDelete was not called", TestUpdateRequestProcessor.processDeleteCalled);
|
||||
assertTrue("Update request processor finish was not called", TestUpdateRequestProcessor.finishCalled);
|
||||
|
||||
MockDataSource.clearCache();
|
||||
rows = new ArrayList();
|
||||
rows.add(createMap("$deleteDocById", "3"));
|
||||
MockDataSource.setIterator("select * from x", rows.iterator());
|
||||
runFullImport(dataConfigForSkipTransform, createMap("clean","false"));
|
||||
assertQ(req("id:3"), "//*[@numFound='0']");
|
||||
|
||||
assertTrue("Update request processor processDelete was not called", TestUpdateRequestProcessor.processDeleteCalled);
|
||||
assertTrue("Update request processor finish was not called", TestUpdateRequestProcessor.finishCalled);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue