From e3c7579cad66d1fbd93f9023dbe75593e3062818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E7=BB=B4?= Date: Mon, 24 Jun 2024 11:55:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20HashMapManagerMain=20?= =?UTF-8?q?=E4=B8=AD=E5=AD=98=E5=9C=A8=E9=9A=90=E6=82=A3=E7=9A=84=E9=93=BE?= =?UTF-8?q?=E8=A1=A8=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../access/transam/ondemand_extreme_rto/page_redo.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gausskernel/storage/access/transam/ondemand_extreme_rto/page_redo.cpp b/src/gausskernel/storage/access/transam/ondemand_extreme_rto/page_redo.cpp index 1e6d55860..24e40592d 100644 --- a/src/gausskernel/storage/access/transam/ondemand_extreme_rto/page_redo.cpp +++ b/src/gausskernel/storage/access/transam/ondemand_extreme_rto/page_redo.cpp @@ -3378,8 +3378,10 @@ void HashMapManagerMain() ondemand_htab_ctrl_t *nextHtabCtrl = g_instance.comm_cxt.predo_cxt.redoItemHashCtrl[g_redoWorker->slotId]; // the tail of redoItem hashmap linked list ondemand_htab_ctrl_t *targetHtabCtrl = g_dispatcher->pageLines[g_redoWorker->slotId].managerThd->redoItemHashCtrl; + // the processing redoItem hashmap + ondemand_htab_ctrl_t *procHtabCtrl = nextHtabCtrl; while (nextHtabCtrl != targetHtabCtrl) { - ondemand_htab_ctrl_t *procHtabCtrl = nextHtabCtrl; + procHtabCtrl = nextHtabCtrl; nextHtabCtrl = (ondemand_htab_ctrl_t *)nextHtabCtrl->nextHTabCtrl; if (XLByteLT(procHtabCtrl->maxRedoItemPtr, ckptRedoPtr)) { PRTrackAllClear(procHtabCtrl->hTab); @@ -3394,8 +3396,10 @@ void HashMapManagerMain() // step3: prune current hashmap CountAndGetRedoTime(g_redoWorker->timeCostList[TIME_COST_STEP_2], t_thrd.xlog_cxt.timeCost[TIME_COST_STEP_3]); + //Retrieves the header of the hashmap linked list + procHtabCtrl = g_instance.comm_cxt.predo_cxt.redoItemHashCtrl[g_redoWorker->slotId]; if (pruneMax) { - HashMapManagerProcHashmapPrune(nextHtabCtrl->hTab, ckptRedoPtr, updateStat); + HashMapManagerProcHashmapPrune(procHtabCtrl->hTab, ckptRedoPtr, updateStat); pg_atomic_write_u64(&g_redoWorker->nextPrunePtr, ckptRedoPtr); } CountRedoTime(g_redoWorker->timeCostList[TIME_COST_STEP_3]);