Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
133083: server/license: Allow silencing of license grace period NOTICE r=rafiss a=spilchen

Previously, we were unable to silence the notice emitted during the license grace period because we were using an incorrect API, which bypassed checks that respect environment settings. This fix ensures the notice can be silenced if the `client_min_messages variable` is set or the `sql.notices.enabled` cluster setting is configured, but the notice will still be displayed by default.

Epic: CRDB-39988
Closes cockroachdb#133050
Release note: none

Co-authored-by: Matt Spilchen <matt.spilchen@cockroachlabs.com>
  • Loading branch information
craig[bot] and spilchen committed Oct 23, 2024
2 parents ee6710a + 7fd641c commit 3d765c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/conn_executor_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ func (ex *connExecutor) execStmtInOpenState(
if notice, err := ex.server.cfg.LicenseEnforcer.MaybeFailIfThrottled(ctx, curOpen); err != nil {
return makeErrEvent(err)
} else if notice != nil {
res.BufferNotice(notice)
p.BufferClientNotice(ctx, notice)
}
}
}
Expand Down

0 comments on commit 3d765c7

Please sign in to comment.