(conn net.Conn, buf []byte)
| 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 |
no test coverage detected