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

Struct attachStepExecer

server/attach_timeout.go:70–75  ·  view source on GitHub ↗

attachStepExecer runs catalog-attachment statements against db with a hard per-statement deadline. Each statement runs under a context deadline (the duckdb-go driver propagates cancellation by repeatedly calling duckdb_interrupt, which stops a query that reaches an execution checkpoint) plus a watch

Source from the content-addressed store, hash-verified

68// acquiring the semaphore and `defer ae.releaseSem(sem)` in place of the bare
69// `defer func() { <-sem }()`.
70type attachStepExecer struct {
71 db *sql.DB
72
73 mu sync.Mutex
74 abandoned []abandonedAttachStmt
75}
76
77type abandonedAttachStmt struct {
78 query string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected