mirror of https://github.com/apache/lucene.git
SOLR-5996: Improve request fail logging by including id.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1588846 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f548fdc1e9
commit
2ce470fa6c
|
@ -76,22 +76,22 @@ public class StopableIndexingThread extends AbstractFullDistribZkTestBase.Stopab
|
||||||
boolean addFailed = false;
|
boolean addFailed = false;
|
||||||
|
|
||||||
if (doDeletes && AbstractFullDistribZkTestBase.random().nextBoolean() && deletes.size() > 0) {
|
if (doDeletes && AbstractFullDistribZkTestBase.random().nextBoolean() && deletes.size() > 0) {
|
||||||
String delete = deletes.remove(0);
|
String deleteId = deletes.remove(0);
|
||||||
try {
|
try {
|
||||||
numDeletes++;
|
numDeletes++;
|
||||||
if (controlClient != null) {
|
if (controlClient != null) {
|
||||||
UpdateRequest req = new UpdateRequest();
|
UpdateRequest req = new UpdateRequest();
|
||||||
req.deleteById(delete);
|
req.deleteById(deleteId);
|
||||||
req.setParam("CONTROL", "TRUE");
|
req.setParam("CONTROL", "TRUE");
|
||||||
req.process(controlClient);
|
req.process(controlClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
cloudClient.deleteById(delete);
|
cloudClient.deleteById(deleteId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.err.println("REQUEST FAILED:");
|
System.err.println("REQUEST FAILED for id=" + deleteId);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if (e instanceof SolrServerException) {
|
if (e instanceof SolrServerException) {
|
||||||
System.err.println("ROOT CAUSE:");
|
System.err.println("ROOT CAUSE for id=" + deleteId);
|
||||||
((SolrServerException) e).getRootCause().printStackTrace();
|
((SolrServerException) e).getRootCause().printStackTrace();
|
||||||
}
|
}
|
||||||
deleteFails.add(id);
|
deleteFails.add(id);
|
||||||
|
@ -104,10 +104,10 @@ public class StopableIndexingThread extends AbstractFullDistribZkTestBase.Stopab
|
||||||
"to come to the aid of their country.");
|
"to come to the aid of their country.");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
addFailed = true;
|
addFailed = true;
|
||||||
System.err.println("REQUEST FAILED:");
|
System.err.println("REQUEST FAILED for id=" + id);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if (e instanceof SolrServerException) {
|
if (e instanceof SolrServerException) {
|
||||||
System.err.println("ROOT CAUSE:");
|
System.err.println("ROOT CAUSE for id=" + id);
|
||||||
((SolrServerException) e).getRootCause().printStackTrace();
|
((SolrServerException) e).getRootCause().printStackTrace();
|
||||||
}
|
}
|
||||||
addFails.add(id);
|
addFails.add(id);
|
||||||
|
|
Loading…
Reference in New Issue