Skip to content

Print error when DateTimeZoneIndex init with failure for debug#9758

Merged
findepi merged 1 commit intotrinodb:masterfrom
caneGuy:zhoukang/improve-date-log
Apr 4, 2022
Merged

Print error when DateTimeZoneIndex init with failure for debug#9758
findepi merged 1 commit intotrinodb:masterfrom
caneGuy:zhoukang/improve-date-log

Conversation

@caneGuy
Copy link
Copy Markdown
Contributor

@caneGuy caneGuy commented Oct 25, 2021

DateTimeZoneIndex may init with failure, for example:
截屏2021-10-25 下午7 26 26

and then we may get

Could not initialize class io.trino.util.util.DateTimeZoneIndex' if we use function like 'format_datetime()

We should print the failure message as log for quick debugging.

@cla-bot cla-bot bot added the cla-signed label Oct 25, 2021
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception must be propagated, otherwise the class will be loaded and appear as fully initialized, despite not being so.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @findepi fixed

@caneGuy caneGuy requested a review from findepi October 29, 2021 03:29
`DateTimeZoneIndex` init may fail when running tests (locally, or on the
CI) and the static initializer failure is not always nicely shown. Log
to increase visibility.
@findepi findepi force-pushed the zhoukang/improve-date-log branch from 2a45fa1 to 5b133a2 Compare April 1, 2022 15:40
@findepi findepi merged commit 8a095cd into trinodb:master Apr 4, 2022
@findepi findepi added test no-release-notes This pull request does not require release notes entry labels Apr 4, 2022
@github-actions github-actions bot added this to the 376 milestone Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry test

Development

Successfully merging this pull request may close these issues.

2 participants