Bugfixs patched from 3.1.x to 3.1_opensource_release

This commit is contained in:
sl0
2021-07-29 14:03:21 +08:00
committed by wangzelin.wzl
parent 9bbbb31585
commit 4640a92c31
26 changed files with 217 additions and 135 deletions

View File

@ -739,9 +739,13 @@ OB_INLINE int ObMPQuery::do_process(
} else {
LOG_WARN("query failed", K(ret), K(retry_ctrl_.need_retry()));
}
bool is_partition_hit = session.partition_hit().get_bool();
int err = send_error_packet(ret, NULL, is_partition_hit, (void*)&ctx_.reroute_info_);
if (OB_SUCCESS != err) {
// 当need_retry=false时,可能给客户端回过包了,可能还没有回过任何包。
// 不过,可以确定:这个请求出错了,还没处理完。如果不是已经交给异步EndTrans收尾,
// 则需要在下面回复一个error_packet作为收尾。否则后面没人帮忙发错误包给客户端了,
// 可能会导致客户端挂起等回包。
bool is_partition_hit = session.get_err_final_partition_hit(ret);
int err = send_error_packet(ret, NULL, is_partition_hit, (void *)&ctx_.reroute_info_);
if (OB_SUCCESS != err) { // 发送error包
LOG_WARN("send error packet failed", K(ret), K(err));
}
}