This is an automated email from the ASF dual-hosted git repository. yjhjstz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 416351029259afe37c1009235a5d870d9b1ab289 Author: Ashwin Agrawal <[email protected]> AuthorDate: Mon Feb 27 10:59:38 2023 -0800 Resolve merge fixmes from syncrep.c The implementation questioned is not new and has been there for GPDB4,5,6 and 7. Longer term goal is to make it better but nothing in short term to fix here. Plus, the fixme in SyncRepGetSyncStandbys() can't be done as standbconfig is not created or populated for coordinator-standby. Hence, the code needs to live in SyncRepGetSyncStandbys(). Once proper implementation is done for coodinator and standby then this part can be tackled as well. --- src/backend/replication/syncrep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index 74b7c9288b..6370da778f 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -175,11 +175,13 @@ static bool SyncRepQueueIsOrderedByLSN(int mode); * to be flushed if synchronous_commit is set to the higher level of * remote_apply, because only commit records provide apply feedback. * - * GPDB_12_MERGE_FIXME: we now have quite few hacks for IS_QUERY_DISPATCHER to - * internally treat it as SYNC rep and not using the GUC to make it - * happen. All the places in syncrep.c and walsender.c having conditionals for + * TODO: Longer term goal is to remove hacks under IS_QUERY_DISPATCHER in + * syncrep.c and walsender.c be replaced by synchronous_standby_names GUC. All + * the places in syncrep.c and walsender.c having conditionals for * IS_QUERY_DISPATCHER should be removed and we should try to use proper GUC - * mechanism to force sync nature for master-standby as well. + * mechanism to force sync nature for master-standby as well. Though that goal + * is hard to accomplish without implementing coordinator-standby + * autofailover. */ void SyncRepWaitForLSN(XLogRecPtr lsn, bool commit) @@ -921,8 +923,6 @@ SyncRepGetCandidateStandbys(SyncRepStandbyData **standbys) /* Collect raw data from shared memory */ n = 0; - /* GPDB_12_MERGE_FIXME: Should this be in SyncRepGetSyncStandbysQuorum() - * instead? */ if (IS_QUERY_DISPATCHER()) { bool syncStandbyPresent; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
