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

Method setSQLTransactionDrain

duckdbservice/service.go:197–213  ·  view source on GitHub ↗
(release func())

Source from the content-addressed store, hash-verified

195 progress progressState // stall detection state
196
197 // logger carries user+pid for in-session WARN/ERROR. Discarded on
198 // DestroySession so a hot-idle reuse cannot leak the previous user.
199 logger *slog.Logger
200}
201
202// QueryHandle stores an ad-hoc query awaiting its DoGet.
203type QueryHandle struct {
204 Query string
205 Schema *arrow.Schema
206 TxnID string
207 createdAt time.Time // when registered; the reaper drops a stale ad-hoc handle whose DoGet never arrived (guarded by Session.mu)
208 // finishOperation is the session operation token for an ad-hoc query
209 // awaiting its DoGet.
210 finishOperation func()
211 // finishDrain is the drain token of an ad-hoc query awaiting its DoGet.
212 finishDrain func()
213}
214
215func releaseDrainFunc(release func()) {
216 if release != nil {

Calls 2

releaseDrainFuncFunction · 0.85
NowMethod · 0.80