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

cli: warn the user if the time zone database is unavailable #38197

Merged
merged 1 commit into from
Jun 17, 2019

Conversation

knz
Copy link
Contributor

@knz knz commented Jun 17, 2019

Fixes #23828.
(The part in that issue about the database not being up to date cannot be fixed using the Go standard library - this does not give access to the search path and the version number. A comprehensive fix needs to wait for #36864.)

Release note (cli change): CockroachDB will now print out an error
message and an informative hint if the time zone database is unusable.

@knz knz requested a review from bdarnell June 17, 2019 10:17
@knz knz requested a review from a team as a code owner June 17, 2019 10:17
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@knz
Copy link
Contributor Author

knz commented Jun 17, 2019

Note: I did not include a test because the tz search path is hardcoded in the go std lib and our test images all have a valid database. If you can think of a test approach to overcome that, I'll take it.

Release note (cli change): CockroachDB will now print out an error
message and an informative hint if the time zone database is unusable.
@knz knz force-pushed the 20190617-warn-tz branch from a695127 to 375e7ed Compare June 17, 2019 15:59
@knz
Copy link
Contributor Author

knz commented Jun 17, 2019

TFYR!

bors r+

craig bot pushed a commit that referenced this pull request Jun 17, 2019
38197: cli: warn the user if the time zone database is unavailable r=knz a=knz

Fixes #23828.
(The part in that issue about the database not being up to date cannot be fixed using the Go standard library - this does not give access to the search path and the version number. A comprehensive fix needs to wait for #36864.)

Release note (cli change): CockroachDB will now print out an error
message and an informative hint if the time zone database is unusable.

38214: storage/tscache: save 4 bytes per encoded tscache value r=ajwerner a=nvanbenschoten

`unsafe.Sizeof(hlc.Timestamp{})` was including XXX_sizecache, which was bloating
the struct size even though it didn't have an effect on the encoded size of the
timestamps, which we control in `encodeValue`.

Even once we remove `XXX_sizecache` (#37706), it looks like `unsafe.Sizeof` will
still include padding which we don't want to capture in the `encodedTsSize` constant,
so this seems like the best approach. See https://play.golang.org/p/5swJSSbP6J4.

Release note: None

Co-authored-by: Raphael 'kena' Poss <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jun 17, 2019

Build succeeded

@craig craig bot merged commit 375e7ed into cockroachdb:master Jun 17, 2019
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.

cli/config: Warn if zoneinfo not available or up to date
3 participants