This is an automated email from the ASF dual-hosted git repository. maxyang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 613e913910825b5e8a35491a450e8ad744d29162 Author: Huansong Fu <[email protected]> AuthorDate: Thu Mar 31 21:40:30 2022 -0700 Update the comments for commit 9116c93 Commit 9116c93 fixed an issue that global transaction still continues even after FTS changed cluster configuration during the transaction. The fix worked perfectly but the comments could use some clarification where we found confusing. --- src/backend/cdb/dispatcher/cdbgang_async.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/cdb/dispatcher/cdbgang_async.c b/src/backend/cdb/dispatcher/cdbgang_async.c index 9d597c66aa..fea19bff0e 100644 --- a/src/backend/cdb/dispatcher/cdbgang_async.c +++ b/src/backend/cdb/dispatcher/cdbgang_async.c @@ -79,8 +79,14 @@ cdbgang_createGang_async(List *segments, SegmentType segmentType) newGangDefinition = buildGangDefinition(segments, segmentType); CurrentGangCreating = newGangDefinition; /* - * If we're in a global transaction, and there is some primary segment down, + * If we're in a global transaction, and there is some segment configuration change, * we have to error out so that the current global transaction can be aborted. + * This is because within a transaction we use cached version of configuration information + * obtained at start of transaction, which we can't update in-middle of transaction. + * so QD will still talk to the old primary but not a new promoted one. This isn't an issue + * if the old primary is completely down since we'll find a FATAL error during communication, + * but becomes an issue if the old primary is working and acting like normal to QD. + * * Before error out, we need to reset the session instead of disconnectAndDestroyAllGangs. * The latter will drop CdbComponentsContext what we will use in AtAbort_Portals. * Because some primary segment is down writerGangLost will be marked when recycling gangs, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
