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

Method resolveSessionLimits

controlplane/session_mgr.go:476–487  ·  view source on GitHub ↗
(memoryLimit string, threads int)

Source from the content-addressed store, hash-verified

474 return err != nil && strings.Contains(err.Error(), "max sessions reached")
475}
476
477// isWorkerS3CacheRestoreError reports whether err is the worker-side failure
478// to restore the cache-proxy S3 transport before a new session starts (a
479// previous session's `duckgres.s3_cache = off` bypass that could not be
480// undone; duckdbservice.CreateSession's "restore S3 cache transport before
481// session start" error). The failed worker must not serve the session — its
482// transport state is unknown — but a fresh worker's restore is a no-op, so
483// this class is retried on a recycled acquisition instead of failing the
484// client's connect.
485func isWorkerS3CacheRestoreError(err error) bool {
486 return err != nil && strings.Contains(err.Error(), "restore S3 cache transport")
487}
488
489// isWorkerConnPoolTimeoutError reports whether err is the worker-side
490// "failed to obtain connection from pool" session-create failure

Calls 2

MemoryLimitMethod · 0.80
PerSessionThreadsMethod · 0.80