Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: use must instead of logcrash.ReportOrPanic #107846

Closed
wants to merge 3 commits into from

Conversation

erikgrinaker
Copy link
Contributor

*: use must instead of logcrash.ReportOrPanic

logcrash: remove ReportOrPanic()

logcrash: remove debug.panic_on_failed_assertions

This patch removes the cluster setting debug.panic_on_failed_assertions in favor of the environment variable COCKROACH_FATAL_ASSERTIONS. Environment variables do not depend on a functional KV subsystem for propagation and are thus more reliable. They also avoid having to thread cluster settings through the code. They are less convenient, but we rarely if ever expect users to enable fatal assertions, as they are more for use in tests and development.

Resolves #107428.
Epic: none
Release note: None

@erikgrinaker erikgrinaker requested review from knz and a team July 29, 2023 09:35
@erikgrinaker erikgrinaker requested review from a team as code owners July 29, 2023 09:35
@erikgrinaker erikgrinaker requested a review from a team July 29, 2023 09:35
@erikgrinaker erikgrinaker requested review from a team as code owners July 29, 2023 09:35
@erikgrinaker erikgrinaker requested review from HonoreDB and removed request for a team July 29, 2023 09:35
@blathers-crl
Copy link

blathers-crl bot commented Jul 29, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@erikgrinaker erikgrinaker requested a review from cucaroach July 29, 2023 09:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Epic: none
Release note: None
Epic: none
Release note: None
This patch removes the cluster setting
`debug.panic_on_failed_assertions` in favor of the environment variable
`COCKROACH_FATAL_ASSERTIONS`. Environment variables do not depend on a
functional KV subsystem for propagation and are thus more reliable.
They also avoid having to thread cluster settings through the code.
They are less convenient, but we rarely if ever expect users to enable
fatal assertions, as they are more for use in tests and development.

Epic: none
Release note: None
@erikgrinaker
Copy link
Contributor Author

No point reviewing this until we address #107790 (review), so marking as draft.

@erikgrinaker erikgrinaker marked this pull request as draft July 31, 2023 17:47
@erikgrinaker
Copy link
Contributor Author

Closing, as must was reverted in #108272.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

util/must: merge with logcrash assertions
2 participants