TangSiyang2001 commented on code in PR #17132:
URL: https://github.com/apache/doris/pull/17132#discussion_r1118011505
##########
fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java:
##########
@@ -127,19 +129,28 @@ private void forward() throws Exception {
boolean isReturnToPool = false;
try {
- result = client.forward(params);
+ client.forward(params);
isReturnToPool = true;
} catch (TTransportException e) {
+ // wrap the raw exception.
+ Exception exception = new ForwardToMasterException(
+ String.format("Forward statement %s to Master %s failed",
ctx.getStmtId(),
+ thriftAddress), e);
+
boolean ok = ClientPool.frontendPool.reopen(client,
thriftTimeoutMs);
if (!ok) {
- throw e;
+ throw exception;
}
if (shouldNotRetry || e.getType() ==
TTransportException.TIMED_OUT) {
- throw e;
+ throw exception;
} else {
LOG.warn("Forward statement " + ctx.getStmtId() + " to Master
" + thriftAddress + " twice", e);
- result = client.forward(params);
- isReturnToPool = true;
+ try {
+ client.forward(params);
+ isReturnToPool = true;
+ } catch (TException ex) {
Review Comment:
That may result in a naming confict haha.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]