From c4d32a65bf67bcb40fe6d3edaebf82f05d72791a Mon Sep 17 00:00:00 2001 From: vastdata-xyzr Date: Tue, 27 Aug 2024 18:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86elog=E4=B8=ADreset=E5=92=8Ccl?= =?UTF-8?q?ean=E6=97=B6=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E5=86=85?= =?UTF-8?q?=E5=AD=98=E4=B8=8A=E4=B8=8B=E6=96=87=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/backend/utils/error/elog.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/common/backend/utils/error/elog.cpp b/src/common/backend/utils/error/elog.cpp index 31ee6fdbb..4aa5122a1 100644 --- a/src/common/backend/utils/error/elog.cpp +++ b/src/common/backend/utils/error/elog.cpp @@ -5874,9 +5874,6 @@ ErrorDataArea *initErrorDataArea() void cleanErrorDataArea(ErrorDataArea *errorDataArea) { Assert(errorDataArea != NULL); - MemoryContext oldcontext; - - oldcontext = MemoryContextSwitchTo(u_sess->dolphin_errdata_ctx.dolphinErrorDataMemCxt); ListCell *lc = NULL; foreach (lc, errorDataArea->sqlErrorDataList) { @@ -5901,7 +5898,6 @@ void cleanErrorDataArea(ErrorDataArea *errorDataArea) for (int i = 0; i <= enum_dolphin_error_level::B_END; i++) { errorDataArea->current_edata_count_by_level[i] = 0; } - MemoryContextSwitchTo(oldcontext); } void copyErrorDataArea(ErrorDataArea *from, ErrorDataArea *to) @@ -5943,8 +5939,6 @@ void copyErrorDataArea(ErrorDataArea *from, ErrorDataArea *to) void resetErrorDataArea(bool stacked, bool handler_active) { /* reset all count to zero and list to null */ - MemoryContext oldcontext; - oldcontext = MemoryContextSwitchTo(u_sess->dolphin_errdata_ctx.dolphinErrorDataMemCxt); ErrorDataArea *errorDataArea = u_sess->dolphin_errdata_ctx.errorDataArea; ErrorDataArea *lastErrorDataArea = u_sess->dolphin_errdata_ctx.lastErrorDataArea; if (stacked) { @@ -5957,7 +5951,6 @@ void resetErrorDataArea(bool stacked, bool handler_active) } } cleanErrorDataArea(errorDataArea); - MemoryContextSwitchTo(oldcontext); } enum_dolphin_error_level errorLevelToDolphin(int elevel)