修复逻辑错误导致页面不走rebuild逻辑的问题

This commit is contained in:
arcoalien@qq.com
2024-03-28 17:38:12 +08:00
committed by yaoxin
parent 0c7b9176bf
commit 831798774f
2 changed files with 1 additions and 9 deletions

View File

@ -1285,7 +1285,7 @@ static bool SSCheckBufferIfCanGoRebuild(BufferDesc* buf_desc, uint64 buf_state)
dms_buf_ctrl_t *buf_ctrl = GetDmsBufCtrl(buf_desc->buf_id);
if ((buf_state & BM_VALID) && (buf_ctrl->lock_mode != (unsigned char)DMS_LOCK_NULL)) {
ret = true;
} else if ((buf_state & BM_TAG_VALID) && (buf_ctrl->lock_mode != (unsigned char)DMS_LOCK_NULL) && !(buf_ctrl->state | BUF_IS_EXTEND)) {
} else if ((buf_state & BM_TAG_VALID) && (buf_ctrl->lock_mode != (unsigned char)DMS_LOCK_NULL)) {
if (LWLockConditionalAcquire(buf_desc->io_in_progress_lock, LW_SHARED)) {
ret = true;
} else {

View File

@ -2190,14 +2190,6 @@ static bool ReadBuffer_common_ReadBlock(SMgrRelation smgr, char relpersistence,
}
}
if (ENABLE_DMS) {
Buffer buf = BlockGetBuffer((char *)bufBlock);
dms_buf_ctrl_t *buf_ctrl = GetDmsBufCtrl(buf - 1);
if (buf_ctrl->lock_mode == DMS_LOCK_NULL) {
ereport(PANIC, (errmsg("It seemd read buffer not across DMS!")));
}
}
return needputtodirty;
}