Skip to content

Commit

Permalink
issue-710: Do not kill system user
Browse files Browse the repository at this point in the history
  • Loading branch information
shunki-fujita committed Jul 1, 2024
1 parent c545ebb commit d7c7523
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/dbop/kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ func (o *operator) KillConnections(ctx context.Context) error {
if p.Host == "localhost" {
continue
}
if p.User == "system user" {
continue
}

if _, err := o.db.ExecContext(ctx, `KILL CONNECTION ?`, p.ID); err != nil && !isNoSuchThread(err) {
return fmt.Errorf("failed to kill connection %d for %s from %s: %w", p.ID, p.User, p.Host, err)
Expand Down

0 comments on commit d7c7523

Please sign in to comment.