MCPcopy Create free account
hub / github.com/PostHog/duckgres / removeWaiterLocked

Method removeWaiterLocked

controlplane/session_mgr.go:316–325  ·  view source on GitHub ↗
(waiter *connectionWaiter)

Source from the content-addressed store, hash-verified

314// CreateSession acquires a worker from the configured pool, creates a session
315// on it, and rebalances memory/thread limits across all active sessions.
316// If pid is 0, a new one is generated.
317func (sm *SessionManager) CreateSession(ctx context.Context, username string, pid int32, memoryLimit string, threads int, profile *WorkerProfile) (int32, *flightclient.FlightExecutor, error) {
318 return sm.CreateSessionWithProtocol(ctx, username, pid, memoryLimit, threads, "postgres", profile)
319}
320
321func (sm *SessionManager) CreateSessionWithProtocol(ctx context.Context, username string, pid int32, memoryLimit string, threads int, protocol string, profile *WorkerProfile) (resultPID int32, resultExecutor *flightclient.FlightExecutor, resultErr error) {
322 ctx, finishCreation, err := sm.beginSessionCreation(ctx)
323 if err != nil {
324 return 0, nil, err
325 }
326 defer func() {
327 if !finishCreation() {
328 return

Callers 1

acquireConnectionSlotMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected