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

Function fullRead

controlplane/control.go:1634–1644  ·  view source on GitHub ↗
(conn net.Conn, buf []byte)

Source from the content-addressed store, hash-verified

1632 sessionEverCreated = false
1633 if orgID != "" {
1634 observeOrgSessionsActive(orgID, sessions.SessionCount())
1635 }
1636 escMemLimit, escThreads := cp.workerDuckDBLimits(workerProfile)
1637 createCtx, cancel := context.WithTimeout(ctx, cp.cfg.WorkerQueueTimeout)
1638 defer cancel()
1639 _, exec, err := sessions.CreateSession(createCtx, username, pid, escMemLimit, escThreads, workerProfile)
1640 if err != nil {
1641 // Classified with the same logic the eager connect path uses, so
1642 // the client sees the real SQLSTATE + message (53300 with a retry
1643 // hint at capacity, 53400 for a vCPU-admission rejection, 57P03
1644 // while draining) instead of a substring guess.
1645 return nil, 0, "", fmt.Errorf("escalate to standard worker: %w", newSessionAcquireError(err))
1646 }
1647 sessionEverCreated = true

Callers 1

readStartupFromRawFunction · 0.85

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected