create a send transaction exception on the calling thread and fill its stack, so we know where its coming from
This commit is contained in:
parent
07480846c3
commit
553e8134ee
|
@ -23,7 +23,7 @@ import org.elasticsearch.ElasticSearchWrapperException;
|
|||
import org.elasticsearch.common.transport.TransportAddress;
|
||||
|
||||
/**
|
||||
* @author kimchy (Shay Banon)
|
||||
* @author kimchy (shay.banon)
|
||||
*/
|
||||
public class RemoteTransportException extends TransportException implements ElasticSearchWrapperException {
|
||||
|
||||
|
|
|
@ -28,5 +28,6 @@ public class SendRequestTransportException extends RemoteTransportException {
|
|||
|
||||
public SendRequestTransportException(DiscoveryNode node, String action, Throwable cause) {
|
||||
super(node == null ? null : node.name(), node == null ? null : node.address(), action, cause);
|
||||
fillStack();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,9 +195,10 @@ public class TransportService extends AbstractLifecycleComponent<TransportServic
|
|||
}
|
||||
// callback that an exception happened, but on a different thread since we don't
|
||||
// want handlers to worry about stack overflows
|
||||
final SendRequestTransportException sendRequestException = new SendRequestTransportException(node, action, e);
|
||||
threadPool.execute(new Runnable() {
|
||||
@Override public void run() {
|
||||
handler.handleException(new SendRequestTransportException(node, action, e));
|
||||
handler.handleException(sendRequestException);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue