From 40b7f9960afd739aa3f13e1232d8811f1a55254e Mon Sep 17 00:00:00 2001 From: muyulinzhong Date: Tue, 25 Mar 2025 10:14:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=9B=A0=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E8=BF=9B=E5=BA=A6=E8=BF=87=E5=BF=AB=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4reset=E6=B8=85=E7=A9=BA=E9=94=99=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BD=93=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/storage/access/transam/cbmparsexlog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gausskernel/storage/access/transam/cbmparsexlog.cpp b/src/gausskernel/storage/access/transam/cbmparsexlog.cpp index b4c5bf78da..d9710b2671 100644 --- a/src/gausskernel/storage/access/transam/cbmparsexlog.cpp +++ b/src/gausskernel/storage/access/transam/cbmparsexlog.cpp @@ -1289,7 +1289,10 @@ static bool ParseXlogIntoTaskFluent(bool isRecEnd) { } } /* By far, this thread must find nothing to do, just clean resource. */ - ResetCBMReaderStatus(pg_atomic_read_u32(&head->CBMRecord.threadIndex)); + if (pg_atomic_read_u32(&head->CBMRecord.threadIndex) != INVAILD_CBM_THREAD_NUM) { + /* We can only reset the correct thread status record. */ + ResetCBMReaderStatus(pg_atomic_read_u32(&head->CBMRecord.threadIndex)); + } CBMQueuePopFront(); head = t_thrd.cbm_cxt.XlogCbmSys->headQueueNode->next; continue; -- Gitee