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;
|
||||
|
||||
if (doDeletes && AbstractFullDistribZkTestBase.random().nextBoolean() && deletes.size() > 0) {
|
||||
String delete = deletes.remove(0);
|
||||
String deleteId = deletes.remove(0);
|
||||
try {
|
||||
numDeletes++;
|
||||
if (controlClient != null) {
|
||||
UpdateRequest req = new UpdateRequest();
|
||||
req.deleteById(delete);
|
||||
req.deleteById(deleteId);
|
||||
req.setParam("CONTROL", "TRUE");
|
||||
req.process(controlClient);
|
||||
}
|
||||
|
||||
cloudClient.deleteById(delete);
|
||||
cloudClient.deleteById(deleteId);
|
||||
} catch (Exception e) {
|
||||
System.err.println("REQUEST FAILED:");
|
||||
System.err.println("REQUEST FAILED for id=" + deleteId);
|
||||
e.printStackTrace();
|
||||
if (e instanceof SolrServerException) {
|
||||
System.err.println("ROOT CAUSE:");
|
||||
System.err.println("ROOT CAUSE for id=" + deleteId);
|
||||
((SolrServerException) e).getRootCause().printStackTrace();
|
||||
}
|
||||
deleteFails.add(id);
|
||||
|
@ -104,10 +104,10 @@ public class StopableIndexingThread extends AbstractFullDistribZkTestBase.Stopab
|
|||
"to come to the aid of their country.");
|
||||
} catch (Exception e) {
|
||||
addFailed = true;
|
||||
System.err.println("REQUEST FAILED:");
|
||||
System.err.println("REQUEST FAILED for id=" + id);
|
||||
e.printStackTrace();
|
||||
if (e instanceof SolrServerException) {
|
||||
System.err.println("ROOT CAUSE:");
|
||||
System.err.println("ROOT CAUSE for id=" + id);
|
||||
((SolrServerException) e).getRootCause().printStackTrace();
|
||||
}
|
||||
addFails.add(id);
|
||||
|
|
Loading…
Reference in New Issue