add openGauss 3.1.0 feature code

This commit is contained in:
yanghao
2022-09-03 16:22:35 +08:00
parent 801d945a3d
commit b919f404e8
2759 changed files with 521358 additions and 366321 deletions

View File

@ -1012,6 +1012,24 @@ void StreamNodeGroup::syncQuit(StreamObjStatus status)
pgstat_report_waitstatus(oldStatus);
}
void StreamNodeGroup::ReleaseStreamGroup(bool resetSession)
{
if (u_sess->stream_cxt.global_obj != NULL) {
StreamTopConsumerIam();
/* Set sync point for waiting all stream threads complete. */
StreamNodeGroup::syncQuit(STREAM_COMPLETE);
UnRegisterStreamSnapshots();
StreamNodeGroup::destroy(STREAM_COMPLETE);
if (!resetSession) {
/* reset some flag related to stream */
ResetStreamEnv();
}
}
if (resetSession) {
ResetSessionEnv();
}
}
/*
* @Description: Clear the stream node group
*
@ -1330,9 +1348,7 @@ void StreamNodeGroup::SyncProducerNextPlanStep(int controller_plannodeid, int pr
} break;
case T_Stream: {
ExecSyncStreamProducer((StreamController*)controller, need_rescan, target_iteration);
}
break;
} break;
default:
elog(ERROR, "Unsupported SyncProducerType %d", controller->controller_type);
}