util/log: make SecondaryLogger a Closer and do the right thing#45695
Merged
tbg merged 2 commits intocockroachdb:masterfrom Mar 4, 2020
Merged
util/log: make SecondaryLogger a Closer and do the right thing#45695tbg merged 2 commits intocockroachdb:masterfrom
tbg merged 2 commits intocockroachdb:masterfrom
Conversation
Member
Contributor
Author
|
bors r=tbg |
Contributor
Author
|
bors r=tbg |
Previously, unavailability of named time zones (issue cockroachdb#36864) was only causing an error message to be printed on the terminal and the log files. However, some users were not looking and would instead run directly into silently incorrect results in SQL. This change ensures a node doesn't even start when the TZ database is not ready. Example output: ``` ERROR: unable to load named timezones HINT: See: cockroachdb#36864 -- Check that the time zone database is installed on your system, or set the ZONEINFO environment variable to a Go time zone .zip archive. Failed running "demo" ``` Release note (cli change): CockroachDB now refuses to start if named time zones are not properly configured. It is possible to override this behavior for testing purposes, with the understanding that doing so will cause incorrect SQL results and other inconsistencies, using the environment variable `COCKROACH_INCONSISTENT_TIME_ZONES`.
Previously, secondary loggers would leak in the global registry. A previous patch of mine tried to improve the situation by asynchronously de-registering loggers, but that was not good enough. This patch fixes that by adding a `Close()` method to do the job. Release note: None
Contributor
Build failed (retrying...) |
Member
|
bors r- |
Contributor
Canceled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #45641.
Previously, secondary loggers would leak in the global registry.
A previous patch of mine tried to improve the situation by
asynchronously de-registering loggers, but that was not good enough.
This patch fixes that by adding a
Close()method to do the job.Release note: None