!1196 修复备机fd泄漏问题

Merge pull request !1196 from lancy/new_master
This commit is contained in:
opengauss-bot
2021-08-05 14:57:20 +00:00
committed by Gitee
2 changed files with 6 additions and 32 deletions

View File

@ -860,23 +860,10 @@ static bool DispatchRelMapRecord(XLogReaderState *record, List *expectedTLIs, Ti
static bool DispatchXactRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime)
{
if (XactWillRemoveRelFiles(record)) {
/* for parallel performance */
if (SUPPORT_FPAGE_DISPATCH) {
int nrels = 0;
ColFileNodeRel *xnodes = NULL;
XactGetRelFiles(record, &xnodes, &nrels);
for (int i = 0; ((i < nrels) && (xnodes != NULL)); ++i) {
ColFileNode node;
ColFileNodeRel *nodeRel = xnodes + i;
ColFileNodeCopy(&node, nodeRel);
uint32 id = GetSlotId(node.filenode, 0, 0, GetBatchCount());
AddSlotToPLSet(id);
}
} else {
for (uint32 i = 0; i < g_dispatcher->pageLineNum; i++) {
AddSlotToPLSet(i);
}
}
/* sync with trxn thread */
/* trx execute drop action, pageworker forger invalid page,
* pageworker first exe and update lastcomplateLSN

View File

@ -722,23 +722,10 @@ static bool DispatchRelMapRecord(XLogReaderState *record, List *expectedTLIs, Ti
static bool DispatchXactRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime)
{
if (XactWillRemoveRelFiles(record)) {
/* for parallel performance */
if (SUPPORT_FPAGE_DISPATCH) {
int nrels = 0;
ColFileNodeRel *xnodes = NULL;
XactGetRelFiles(record, &xnodes, &nrels);
for (int i = 0; ((i < nrels) && (xnodes != NULL)); ++i) {
ColFileNode node;
ColFileNodeRel *nodeRel = xnodes + i;
ColFileNodeCopy(&node, nodeRel);
uint32 id = GetWorkerId(node.filenode, 0, 0);
AddWorkerToSet(id);
}
} else {
for (uint32 i = 0; i < g_dispatcher->pageWorkerCount; i++) {
AddWorkerToSet(i);
}
}
/* sync with trxn thread */
/* trx execute drop action, pageworker forger invalid page,
* pageworker first exe and update lastcomplateLSN