From 37cd700e944ef8f07c41d65fc955a1dc1c9d54b9 Mon Sep 17 00:00:00 2001 From: jiwenke Date: Sat, 14 Sep 2024 09:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3adps=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E9=80=80=E5=87=BA=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/backend/pgxc_single/pool/execRemote.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/common/backend/pgxc_single/pool/execRemote.cpp b/src/common/backend/pgxc_single/pool/execRemote.cpp index f0bf19973..d97136f84 100755 --- a/src/common/backend/pgxc_single/pool/execRemote.cpp +++ b/src/common/backend/pgxc_single/pool/execRemote.cpp @@ -1308,7 +1308,18 @@ void spq_adps_coordinator_thread_main() pthread_cond_wait(&t_thrd.spq_ctx.qc_ctx->pq_wait_cv, &t_thrd.spq_ctx.qc_ctx->spq_pq_mutex); pthread_mutex_unlock(&t_thrd.spq_ctx.qc_ctx->spq_pq_mutex); } else { - spq_adps_consumer(); + PG_TRY(); + { + spq_adps_consumer(); + } + PG_CATCH(); + { + pthread_mutex_unlock(&t_thrd.spq_ctx.qc_ctx->spq_pq_mutex); + spq_finishQcThread(); + t_thrd.spq_ctx.qc_ctx->is_exited = true; + PG_RE_THROW(); + } + PG_END_TRY(); pthread_mutex_unlock(&t_thrd.spq_ctx.qc_ctx->spq_pq_mutex); } }