MCPcopy Create free account
hub / github.com/apache/cloudberry / AcquireSessionState

Function AcquireSessionState

src/backend/utils/test/session_state_test.c:96–113  ·  view source on GitHub ↗

* Acquires a SessionState entry for the specified sessionid. If an existing entry * is found, this method reuses that entry */

Source from the content-addressed store, hash-verified

94 * is found, this method reuses that entry
95 */
96static SessionState *
97AcquireSessionState(int sessionId, int loglevel)
98{
99 will_be_called_count(LWLockAcquire, 1);
100 will_be_called_count(LWLockRelease, 1);
101 expect_any_count(LWLockAcquire, lock, 1);
102 expect_any_count(LWLockAcquire, mode, 1);
103 expect_any_count(LWLockRelease, lock, 1);
104
105 /* Keep the assertions happy */
106 gp_session_id = sessionId;
107 sessionStateInited = false;
108 MySessionState = NULL;
109
110 EXPECT_EREPORT(loglevel);
111 SessionState_Init();
112 return (SessionState *) MySessionState;
113}
114
115/* Releases a SessionState entry for the specified sessionId */
116static void

Calls 1

SessionState_InitFunction · 0.85

Tested by

no test coverage detected