!4045 【资源池化】优化cm_agent获取快照逻辑,不走dms,减少cm_agent获取状态异常的场景

Merge pull request !4045 from cchen676/0809master_1
This commit is contained in:
opengauss_bot
2023-08-31 07:27:51 +00:00
committed by Gitee

View File

@ -99,6 +99,12 @@ Snapshot SSGetSnapshotData(Snapshot snapshot)
return NULL;
}
/* For cm agent, it only query the system status using the parameter in memory. So don't need MVCC */
if (u_sess->libpq_cxt.IsConnFromCmAgent) {
snapshot = SnapshotNow;
return snapshot;
}
if (!ENABLE_SS_BCAST_SNAPSHOT ||
(g_instance.dms_cxt.latest_snapshot_xmax == InvalidTransactionId &&
t_thrd.dms_cxt.latest_snapshot_xmax == InvalidTransactionId)) {