!188 fix: #I7H9RH

Merge pull request !188 from wangyao/dev_performance
This commit is contained in:
shenzhengntu 2023-07-03 12:07:28 +00:00 committed by Gitee
commit 5c92c23dcd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 2 deletions

View File

@ -405,8 +405,9 @@ CleanLogIndexMain(int argc, char *argv[])
}
if (PrevPushPoint != 0) {
XLogRecPtr lastReplPtr = GetXLogReplayRecPtr(NULL);
// elog(LOG, "deal page from %x to %x", PrevPushPoint, lastReplPtr);
TagNode *tagList = GetBufTagByLsnRange(PrevPushPoint,lastReplPtr-1);
if (tagList->next != NULL && tagList->tag.lsn > PrevPushPoint) {
if (tagList->next != NULL && tagList->tag.lsn >= PrevPushPoint) {
LastPushPoint = tagList->tag.lsn;
TagNode *next = tagList->next;
int pageNum = 0;

View File

@ -592,8 +592,12 @@ TagNode *GetBufTagByLsnRange(XLogRecPtr start_lsn, XLogRecPtr end_lsn)
XLogRecPtr page_max_lsn;
// Prevent metadata changes during discovery.
// TODO change to Lightweight Lock
// change to Lightweight Lock
head_node = InitTagNode();
if (end_lsn < start_lsn)
{
return head_node;
}
LWLockAcquire(LogIndexMemListLock,LW_SHARED);
tbl_index = log_index_mem_list->table_start_index;
while(tbl_index != log_index_mem_list->active_table_index)