mirror of https://github.com/apache/lucene.git
log DBQ reordering events
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1357331 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0327e7bf4c
commit
1b4a1653d9
|
@ -170,6 +170,7 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState
|
|||
}
|
||||
|
||||
if (deletesAfter != null) {
|
||||
log.info("Reordered DBQs detected. Update="+cmd+" DBQs="+deletesAfter);
|
||||
List<Query> dbqList = new ArrayList<Query>(deletesAfter.size());
|
||||
for (UpdateLog.DBQ dbq : deletesAfter) {
|
||||
try {
|
||||
|
|
|
@ -22,6 +22,8 @@ import org.apache.solr.request.SolrQueryRequest;
|
|||
import org.apache.solr.util.TestHarness;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -31,16 +33,26 @@ import java.util.Random;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import static org.apache.solr.core.SolrCore.verbose;
|
||||
import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
|
||||
|
||||
public class TestStressReorder extends TestRTGBase {
|
||||
public static Logger log = LoggerFactory.getLogger(TestStressReorder.class);
|
||||
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
initCore("solrconfig-tlog.xml","schema15.xml");
|
||||
}
|
||||
|
||||
public static void verbose(Object... args) {
|
||||
// if (!log.isDebugEnabled()) return;
|
||||
StringBuilder sb = new StringBuilder("VERBOSE:");
|
||||
for (Object o : args) {
|
||||
sb.append(' ');
|
||||
sb.append(o==null ? "(null)" : o.toString());
|
||||
}
|
||||
log.info(sb.toString());
|
||||
}
|
||||
|
||||
// This version simulates updates coming from the leader and sometimes being reordered
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue