修复双集群问题
This commit is contained in:
@ -1392,7 +1392,8 @@ bool libpqrcv_receive(int timeout, unsigned char *type, char **buffer, int *len)
|
|||||||
retcode = MAKE_SQLSTATE(sqlstate[0], sqlstate[1], sqlstate[2], sqlstate[3], sqlstate[4]);
|
retcode = MAKE_SQLSTATE(sqlstate[0], sqlstate[1], sqlstate[2], sqlstate[3], sqlstate[4]);
|
||||||
}
|
}
|
||||||
if (retcode == ERRCODE_UNDEFINED_FILE) {
|
if (retcode == ERRCODE_UNDEFINED_FILE) {
|
||||||
if (t_thrd.role != APPLY_WORKER) {
|
/* in SS dorado standby cluster, the walreceiver not need to receive wal */
|
||||||
|
if (t_thrd.role != APPLY_WORKER && !SS_DORADO_STANDBY_CLUSTER) {
|
||||||
ha_set_rebuild_connerror(WALSEGMENT_REBUILD, REPL_INFO_ERROR);
|
ha_set_rebuild_connerror(WALSEGMENT_REBUILD, REPL_INFO_ERROR);
|
||||||
}
|
}
|
||||||
SpinLockAcquire(&walrcv->mutex);
|
SpinLockAcquire(&walrcv->mutex);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "utils/resowner.h"
|
#include "utils/resowner.h"
|
||||||
#include "pgstat.h"
|
#include "pgstat.h"
|
||||||
#include "ddes/dms/ss_dms_bufmgr.h"
|
#include "ddes/dms/ss_dms_bufmgr.h"
|
||||||
|
#include "replication/ss_disaster_cluster.h"
|
||||||
/*
|
/*
|
||||||
* Segment buffer, used for segment meta data, e.g., segment head, space map head. We separate segment
|
* Segment buffer, used for segment meta data, e.g., segment head, space map head. We separate segment
|
||||||
* meta data buffer and normal data buffer (in bufmgr.cpp) to avoid potential dead locks.
|
* meta data buffer and normal data buffer (in bufmgr.cpp) to avoid potential dead locks.
|
||||||
@ -323,7 +323,7 @@ void SegFlushCheckDiskLSN(SegSpace *spc, RelFileNode rNode, ForkNumber forknum,
|
|||||||
BufferDesc *buf_desc, char *buf)
|
BufferDesc *buf_desc, char *buf)
|
||||||
{
|
{
|
||||||
#ifndef USE_ASSERT_CHECKING
|
#ifndef USE_ASSERT_CHECKING
|
||||||
if (!IsInitdb && !RecoveryInProgress() && !SS_IN_ONDEMAND_RECOVERY && ENABLE_DSS) {
|
if (!IsInitdb && !RecoveryInProgress() && !SS_IN_ONDEMAND_RECOVERY && ENABLE_DSS && !SS_DISASTER_STANDBY_CLUSTER) {
|
||||||
dms_buf_ctrl_t *buf_ctrl = GetDmsBufCtrl(buf_desc->buf_id);
|
dms_buf_ctrl_t *buf_ctrl = GetDmsBufCtrl(buf_desc->buf_id);
|
||||||
XLogRecPtr lsn_on_mem = PageGetLSN(buf);
|
XLogRecPtr lsn_on_mem = PageGetLSN(buf);
|
||||||
/* latest page must satisfy condition: page lsn_on_disk bigger than transfered page which is latest page */
|
/* latest page must satisfy condition: page lsn_on_disk bigger than transfered page which is latest page */
|
||||||
@ -335,7 +335,7 @@ void SegFlushCheckDiskLSN(SegSpace *spc, RelFileNode rNode, ForkNumber forknum,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (!RecoveryInProgress() && !SS_IN_ONDEMAND_RECOVERY && ENABLE_DSS && ENABLE_VERIFY_PAGE_VERSION) {
|
if (!RecoveryInProgress() && !SS_IN_ONDEMAND_RECOVERY && ENABLE_DSS && ENABLE_VERIFY_PAGE_VERSION && !SS_DISASTER_STANDBY_CLUSTER) {
|
||||||
char *origin_buf = (char *)palloc(BLCKSZ + ALIGNOF_BUFFER);
|
char *origin_buf = (char *)palloc(BLCKSZ + ALIGNOF_BUFFER);
|
||||||
char *temp_buf = (char *)BUFFERALIGN(origin_buf);
|
char *temp_buf = (char *)BUFFERALIGN(origin_buf);
|
||||||
seg_physical_read(spc, rNode, forknum, blocknum, temp_buf);
|
seg_physical_read(spc, rNode, forknum, blocknum, temp_buf);
|
||||||
|
Reference in New Issue
Block a user