You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
TiDB cluster's default variable time_zone is SYSTEM
Because we already set time_zone to SYSTEM in session, Lightning will use the local system TZ which is Asia/Tokyo.
To solve this problem quickly. you can set Lightning the same TZ with the TiDB cluster.
Next, We can fix it by set Lightning session TZ to TiDB cluster's system_time_zone when TiDB cluster's time_zone is SYSTEM.
Bug Report
Using the tidb-lightning tool to restore a full backup data.
In the full backup data, there is a table that has
timestamp
columns like this:Set all servers (TiDB, PD, TiKV, Lightning, ...)' timezone to UTC
In the script
deploy/scripts/start_lightning.sh
, set timezone toAsia/Tokyo
Start the tidb-lightning tool
$ cd deploy/ $ scripts/start_lightning.sh
What did you expect to see?
The tidb-lightning tool should respect the original data (in the full backup), import the original data as it is.
What did you see instead?
The tidb-lightning tool has altered the values of
timestamp
columns. For examples,Original data (from the full backup):
Imported data:
So the tidb-lightning tool has altered the values of columns
created_at
andupdated_at
. The original values have been subtracted by 9 hours.Versions of the cluster
TiDB-Lightning version (run
tidb-lightning -V
):TiKV-Importer version (run
tikv-importer -V
)TiKV version (run
tikv-server -V
):TiDB cluster version (execute
SELECT tidb_version();
in a MySQL client):Other interesting information (system version, hardware config, etc):
Operation logs
tidb-lightning.log
for TiDB-Lightning if possibletikv-importer.log
from TiKV-Importer if possibleConfiguration of the cluster and the task
tidb-lightning.toml
for TiDB-Lightning if possibleinventory.ini
if deployed by AnsibleScreenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus for TiDB-Lightning if possible
The text was updated successfully, but these errors were encountered: