t8y2/dbx · warning
strings.Join(failures, "; ")
Error message
strings.Join(failures, "; ")
What it means
closeAllQuerySessions iterates all open query sessions and closes their rows; if any rows.Close() fails, it aggregates each failure as "sessionID: err" and returns them joined with "; " as a single error. This is a shutdown-time cleanup error surfaced during disconnect, indicating one or more open result sets could not be closed cleanly.
Source
Thrown at agents/drivers/argo-go/query.go:279
return false
}
delete(server.querySessions, sessionID)
state.cancel()
_ = state.rows.Close()
return true
}
func (server *server) closeAllQuerySessions() error {
var failures []string
for sessionID, state := range server.querySessions {
delete(server.querySessions, sessionID)
state.cancel()
if err := state.rows.Close(); err != nil {
failures = append(failures, fmt.Sprintf("%s: %v", sessionID, err))
}
}
if len(failures) > 0 {
return errors.New(strings.Join(failures, "; "))
}
return nil
}
func (server *server) expireIdleQuerySessions(now time.Time) int {
expired := make([]string, 0)
for sessionID, state := range server.querySessions {
if !state.lastAccessed.IsZero() && now.Sub(state.lastAccessed) >= querySessionIdleTime {
expired = append(expired, sessionID)
}
}
for _, sessionID := range expired {
server.closeQuerySession(sessionID)
}
return len(expired)
}
func (server *server) executeStatements(params map[string]json.RawMessage, transaction bool) (queryResult, error) {View on GitHub (pinned to c0390bff16)
Solutions
- Inspect the joined message to see which session IDs failed and why
- Ensure all paged queries are fully drained or explicitly cancelled before disconnect
- Treat this as advisory during teardown if the connection is being discarded anyway; reconnect will reset session state
- Check network/TLS stability if this occurs routinely at shutdown
Defensive patterns
Strategy: try-catch
Validate before calling
// no pre-call check; ensure sessions are closed before disconnect
for id, s := range openSessions {
_ = s.close() // close proactively to surface errors early
} Try / catch
if err := client.Disconnect(ctx); err != nil {
if strings.Contains(err.Error(), ": ") { // joined session failures
log.Warn("session close failures during disconnect", "detail", err)
}
} Prevention
- Drain or cancel all paged queries before disconnect
- Log and continue on teardown errors when the connection is being discarded
- Monitor network stability; repeated close failures indicate transport issues
When it happens
Trigger: Calling disconnect while query sessions are open and the underlying driver rows fail to close (e.g. broken connection to the Hive server, already-closed transport, server-side error during close).
Common situations: Shutting down a client whose network connection to HiveServer2 dropped; leaking open paged queries and then disconnecting; TLS or firewall interruptions making the close RPC fail.
Related errors
- ${strings.Join(failures, "; ")}
- list ZooKeeper namespace %s: %w
- ZooKeeper connection event: %w
- close Hive Agent sessions: %s
- ZooKeeper SASL round %d: %w
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/8a972ab55c1e0171.
Report an issue: GitHub.