!1414 修复复制源(replication origin)的redo代码没有适配极致rto和并行回放的问题

Merge pull request !1414 from pengjiong/pub_sub
This commit is contained in:
opengauss-bot 2022-01-05 01:52:54 +00:00 committed by Gitee
commit 129b4593ad
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 19 additions and 0 deletions

View File

@ -1752,6 +1752,7 @@ static const XLogParseBlock g_xlogParseBlockTable[RM_MAX_ID + 1] = {
{ UBTreeRedoParseToBlock, RM_UBTREE_ID },
{ UBTree2RedoParseToBlock, RM_UBTREE2_ID },
{ segpage_redo_parse_to_block, RM_SEGPAGE_ID },
{ NULL, RM_REPLORIGIN_ID },
};
inline XLogRecParseState *XLogParseToBlockCommonFunc(XLogReaderState *record, uint32 *blocknum)
{

View File

@ -142,6 +142,7 @@ static bool DispatchMotRecord(XLogReaderState* record, List* expectedTLIs, Times
#endif
static bool DispatchBtreeRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime);
static bool DispatchSegpageSmgrRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime);
static bool DispatchRepOriginRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime);
static bool DispatchUBTreeRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime);
static bool DispatchUBTree2Record(XLogReaderState* record, List* expectedTLIs, TimestampTz recordXTime);
@ -209,6 +210,7 @@ static const RmgrDispatchData g_dispatchTable[RM_MAX_ID + 1] = {
XLOG_UBTREE2_FREEZE },
{ DispatchSegpageSmgrRecord, RmgrRecordInfoValid, RM_SEGPAGE_ID, XLOG_SEG_ATOMIC_OPERATION,
XLOG_SEG_NEW_PAGE},
{ DispatchRepOriginRecord, RmgrRecordInfoValid, RM_REPLORIGIN_ID, XLOG_REPLORIGIN_SET, XLOG_REPLORIGIN_DROP },
};
void UpdateDispatcherStandbyState(HotStandbyState *state)
@ -1146,6 +1148,13 @@ static bool DispatchSegpageSmgrRecord(XLogReaderState *record, List *expectedTLI
return isNeedFullSync;
}
/* Run from the dispatcher thread. */
static bool DispatchRepOriginRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime)
{
DispatchTxnRecord(record, expectedTLIs, recordXTime, false);
return false;
}
/* Run from the dispatcher thread. */
static bool DispatchCLogRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime)
{

View File

@ -151,6 +151,7 @@ static bool DispatchUBTree2Record(XLogReaderState *record, List *expectedTLIs, T
static bool DispatchMotRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime);
#endif
static bool DispatchSegpageSmgrRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime);
static bool DispatchRepOriginRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime);
static bool RmgrRecordInfoValid(XLogReaderState *record, uint8 minInfo, uint8 maxInfo);
static bool RmgrGistRecordInfoValid(XLogReaderState *record, uint8 minInfo, uint8 maxInfo);
@ -208,6 +209,7 @@ static const RmgrDispatchData g_dispatchTable[RM_MAX_ID + 1] = {
XLOG_UBTREE2_FREEZE },
{ DispatchSegpageSmgrRecord, RmgrRecordInfoValid, RM_SEGPAGE_ID, XLOG_SEG_ATOMIC_OPERATION,
XLOG_SEG_NEW_PAGE },
{ DispatchRepOriginRecord, RmgrRecordInfoValid, RM_REPLORIGIN_ID, XLOG_REPLORIGIN_SET, XLOG_REPLORIGIN_DROP },
};
/* Run from the dispatcher and txn worker thread. */
@ -1057,6 +1059,13 @@ static bool DispatchSegpageSmgrRecord(XLogReaderState* record, List* expectedTLI
return isNeedFullSync;
}
/* Run from the dispatcher thread. */
static bool DispatchRepOriginRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime)
{
DispatchTxnRecord(record, expectedTLIs, recordXTime, false);
return false;
}
/* Run from the dispatcher thread. */
static bool DispatchCLogRecord(XLogReaderState *record, List *expectedTLIs, TimestampTz recordXTime)
{