wal mask problem

Code Source From: Self Code
Description:  【Optional】
Jira:  #【Optional】
市场项目编号(名称):【Optional】
This commit is contained in:
shenzhengntu 2023-03-30 11:31:35 +08:00
parent b720e4664d
commit 0c5a0598c4

View File

@ -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;