Skip to content

Commit

Permalink
Merge #118552
Browse files Browse the repository at this point in the history
118552: server: remove unnecessary log message r=ajstorm a=stevendanna

This error is returned to the connecting client so additionally logging it server side is likely unnecessary.

Fixes #118500

Release note: None

Co-authored-by: Steven Danna <[email protected]>
  • Loading branch information
craig[bot] and stevendanna committed Feb 22, 2024
2 parents ee94b81 + 29da4e4 commit 0232a67
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkg/server/server_controller_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,19 @@ func (c *serverController) sqlMux(
s, err = c.waitForTenantServer(ctx, tenantName)
}
if err != nil {
log.Warningf(ctx, "unable to find server for tenant %q: %v", tenantName, err)
c.sendSQLRoutingError(ctx, conn, tenantName)
// Avoid logging this error since it could
// just be the result of user error (the wrong
// tenant name) or an expected failure (such
// as while the server is draining).
//
// TODO(ssd): In the draining case the node
// should know we are draining and just stop
// accepting SQL clients even when waiting for
// application tenants to stop.
if errors.Is(err, errNoTenantServerRunning) {
return nil
}
return err
}

Expand Down

0 comments on commit 0232a67

Please sign in to comment.