From 0c5a0598c4c8c032f9c36dc1410f10886d9e12ec Mon Sep 17 00:00:00 2001 From: shenzhengntu <503699317@qq.com> Date: Thu, 30 Mar 2023 11:31:35 +0800 Subject: [PATCH] wal mask problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code Source From: Self Code Description: 【Optional】 Jira: #【Optional】 市场项目编号(名称):【Optional】 --- src/backend/access/transam/ringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/access/transam/ringbuffer.c b/src/backend/access/transam/ringbuffer.c index a18e058..297821a 100644 --- a/src/backend/access/transam/ringbuffer.c +++ b/src/backend/access/transam/ringbuffer.c @@ -128,7 +128,7 @@ int walRecordQuery(char**buffer,int* curpos,int* maxspace,uint64 lsn) { return -1; } ring_buffer_size_t tailIdx = gRingBufferManger->tail_index; - int low = tailIdx,high = ((tailIdx+maxIdx) & RING_BUFFER_MASK(buffer)), mid = 0; + int low = tailIdx,high = ((tailIdx+maxIdx) & RING_BUFFER_MASK(gRingBufferManger)), mid = 0; if (low > high) { if (gRingBufferManger->buffer[gRingBufferManger->buffer_mask].startLsn + gRingBufferManger->buffer[gRingBufferManger->buffer_mask].dataLen > lsn) { high = gRingBufferManger->buffer_mask+1;