From 2fe6a86a7c4827215a9af539b140012ee9029ea7 Mon Sep 17 00:00:00 2001 From: shirley_zhengx Date: Sat, 10 Dec 2022 15:25:52 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=85=B1=E4=BA=AB=E5=AD=98=E5=82=A8]forbid=20?= =?UTF-8?q?make=20dirty=20in=20check=5Fbuffer=5Fdirty=5Fflag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/process/postmaster/pagewriter.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gausskernel/process/postmaster/pagewriter.cpp b/src/gausskernel/process/postmaster/pagewriter.cpp index 75d8428ad..63b3c0314 100755 --- a/src/gausskernel/process/postmaster/pagewriter.cpp +++ b/src/gausskernel/process/postmaster/pagewriter.cpp @@ -2134,7 +2134,17 @@ static void incre_ckpt_pgwr_flush_dirty_list(WritebackContext *wb_context, uint3 } static bool check_buffer_dirty_flag(BufferDesc* buf_desc) -{ +{ + /* This function in the pagewriter thread has a concurrency problem with invalidatebuffer of dms reform rebuild, + * there probably exists condition that one page is mark as dirty page in pagewriter thread and invalidatebuffer + * of rebuild is executed before PinBuffer in this function. When flushbuffer function is executed, the tag of + * this buffer is cleaned so that flushbuffer cause core problem.The dirty operation is performed by other normal + * dirty operation logics (for example, the dirty operation is placed back). + */ + if (ENABLE_DMS) { + return false; + } + bool segment_buf = (buf_desc->buf_id >= SegmentBufferStartID); Block tmpBlock = BufHdrGetBlock(buf_desc); uint32 local_buf_state = pg_atomic_read_u32(&buf_desc->state);