Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

remove(or deprecate) 'timezone' item in 'inventory.ini' #1106

Open
bb7133 opened this issue Jan 10, 2020 · 4 comments
Open

remove(or deprecate) 'timezone' item in 'inventory.ini' #1106

bb7133 opened this issue Jan 10, 2020 · 4 comments

Comments

@bb7133
Copy link
Member

bb7133 commented Jan 10, 2020

The 'timezone' item in the current configuration file can be used to determine systemTZ and system_time_zone at the first bootstrap stage(eg. start from zero) of a TiDB cluster. However, after the first bootstrap, those two variables become read-only and never change for a cluster, more detailed information can be referenced as follows:

So, end-users may try to change 'timezone' for an existing TiDB cluster, for example, when doing a rolling-upgrade operation, but found nothing changes: 'timezone' can be confusing and misleading.

For the reason above it's better to remove 'timezone' in TiDB-Ansible, which lead the end-users to the configurations with explicit semantic, like the 'time_zone' system parameter in TiDB.

@tiancaiamao
Copy link
Contributor

The system_time_zone is reasonable.
If the user doesn't specify @@global.time_zone and @@session.time_zone, which time zone should TiDB use?

@tiancaiamao
Copy link
Contributor

Maybe we can change the ansible configure to something like:

bootstrap-timezone: utc+8  // do not edit after the cluster bootstrap, you can use SQL 'set @@global.time_zone' instead

@liubo0127
Copy link
Contributor

Maybe only Remove timezone in inventory.ini, the timezone of the database depends on the local timezone when bootstrap.

@bb7133
Copy link
Member Author

bb7133 commented Jan 11, 2020

The system_time_zone is reasonable.
If the user doesn't specify @@global.time_zone and @@session.time_zone, which time zone should TiDB use?

Certainly, the system_time_zone will be kept. I think using 'bootstrap-timezone' is fine.

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

No branches or pull requests

3 participants