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:
Mark Robert Miller 2014-04-21 03:04:03 +00:00
parent f548fdc1e9
commit 2ce470fa6c
1 changed files with 7 additions and 7 deletions

View File

@ -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);