forked from huawei/openGauss-server
添加相应注释
This commit is contained in:
parent
79eb60ec65
commit
98ea2c0c6d
|
|
@ -623,6 +623,9 @@ bool SyncRepGetSyncRecPtr(XLogRecPtr *receivePtr, XLogRecPtr *writePtr, XLogRecP
|
|||
* or there are not enough synchronous standbys.
|
||||
* but in a particular scenario, when most_available_sync is true, primary only wait the alive sync standbys
|
||||
* if list_length(sync_standbys) doesn't satisfy t_thrd.syncrep_cxt.SyncRepConfig->num_sync.
|
||||
*
|
||||
* All synchronous standbys are allowed to disconnect from the host
|
||||
* only when the maximum available mode is on
|
||||
*/
|
||||
if ((!(*am_sync) && check_am_sync) || t_thrd.syncrep_cxt.SyncRepConfig == NULL ||
|
||||
(!t_thrd.walsender_cxt.WalSndCtl->most_available_sync &&
|
||||
|
|
|
|||
|
|
@ -3209,6 +3209,9 @@ static int WalSndLoop(WalSndSendDataCallback send_data)
|
|||
} else if (t_thrd.syncrep_cxt.SyncRepConfig == NULL ||
|
||||
(t_thrd.walsender_cxt.WalSndCtl->most_available_sync &&
|
||||
list_length(SyncRepGetSyncStandbys(&amSync)) == 0)) {
|
||||
/*
|
||||
* This step is used to deal with the situation that synchronous standbys are not set.
|
||||
*/
|
||||
ArchiveXlogOnStandby(t_thrd.walsender_cxt.MyWalSnd->flush);
|
||||
} else {
|
||||
ereport(WARNING, (errcode(ERRCODE_WARNING),
|
||||
|
|
|
|||
Loading…
Reference in New Issue