Regarding to timezone issue
实在是太乱了。我设置的0时区,插入时间的时候自动减8,查出来的时候又变成0时区的时间了。
Now I changed the comments into English. When I change the timezone in 'taos.cfg' file and restart taosd, the service cannot be started with an error for udf.
写入的时间戳具体值是由该客户端的时区配置决定的,在服务端转化为转化为 UTC-0 ,查出来的时候又根据该客户端的时区配置来转化成相应的时区时间。
写入的时间戳具体值是由该客户端的时区配置决定的,在服务端转化为转化为 UTC-0 ,查出来的时候又根据该客户端的时区配置来转化成相应的时区时间。
Obviously it didn't work as you stated above. If you chang the timezone in 'taos.cf' to UTC-0 and you insert one record with time relevent to UTC-8, the db will convert UTC-8 time to UTC-0 time before storage. But if you read the same record from the db, the timezone adjustment will not be performed and UTC-0 time is returned. To be clear, I'm try to read and write via restful interface.
In my opinion, this conversion should be performed on both direction or no conversion.
you used 6030 or 6041 port ?
you used 6030 or 6041 port ?
it's 6041.
I didn't study in detail about the source code of tdengine. But I guess for other DBs for example PG, they store the timestamp always with reference to UTC-0. The timezone in the conf file may be used only for read and write adjustment purpose. Then you can change the timezone settings without affecting the data in the storage.
I didn't study in detail about the source code of tdengine. But I guess for other DBs for example PG, they store the timestamp always with reference to UTC-0. The timezone in the conf file may be used only for read and write adjustment purpose. Then you can change the timezone settings without affecting the data in the storage.
the Version please ~
I just installed the latest version of tdengine downloaded from official website. I chang the timezone setting from UTC-8 to UTC-0 and then from UTC-0 to UTC-8. Finally the DB cannot be started anymore. I don't think it should work like this. several important prompt by taosd as below.
09/08 15:53:23.333206 00864040 UDF start to init udfd 09/08 15:53:23.333931 00864040 UDF ERROR can not spawn udfd. path: taosd/udfd, error: no such file or directory 09/08 15:53:23.334053 00864031 UDF udfd is cleaned up after spawn err 09/08 15:53:23.334066 00864031 DND ERROR failed to start udfd
ERROR failed to start udfd
I guess this is the ver 3.0.0.1 ? and I guess this is not the last row . could you provide the last part's capture ?
09/08 15:53:23.334066 00864031 DND ERROR failed to start udfd
More precisely It's 3.0.1.0 in the official website. I also checked the technical manual of PG and copied one para from it as below. As per my opinion it's a good pratice for the treatment of time. Maybe taosd is of the same design. In any case I'm not expert and just for your information. For timestamp with time zone, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, GMT). An input value that has an explicit time zone specified is converted to UTC using the appropriate offset for that time zone. If no time zone is stated in the input string, then it is assumed to be in the time zone indicated by the system's TimeZone parameter, and is converted to UTC using the offset for the timezone zone.
It's nearly the complete as below. config part is not pasted here.
================================================================= 09/08 16:50:57.196994 00932634 DND start to init dnode env 09/08 16:50:57.197048 00932634 DND dnode will run in single-process mode 09/08 16:50:57.197708 00932634 DND dnode env is initialized 09/08 16:50:57.197715 00932634 DND start to init service 09/08 16:50:57.197727 00932634 DND node:dnode, start to open 09/08 16:50:57.197733 00932634 UTL worker:dnode-mgmt is initialized, min:1 max:1 09/08 16:50:57.197858 00932643 UDF start to init udfd 09/08 16:50:57.198550 00932643 UDF ERROR can not spawn udfd. path: taosd/udfd, error: no such file or directory 09/08 16:50:57.198649 00932634 UDF udfd is cleaned up after spawn err 09/08 16:50:57.198661 00932634 DND ERROR failed to start udfd 09/08 16:50:57.198667 00932634 DND node:dnode, has been opened 09/08 16:50:57.198687 00932634 DND node:mnode, start to open 09/08 16:50:57.198747 00932634 WAL wal module is initialized, rsetId:3 09/08 16:50:57.198984 00932634 DND mnode start to open 09/08 16:50:57.200062 00932634 MND start to open mnode sync, standby:0 09/08 16:50:57.200226 00932634 SYN vgId:1, sync node use snapshot 09/08 16:50:57.200265 00932634 UTL worker:mnode-query is initialized, min:4 max:4 09/08 16:50:57.200827 00932634 UTL worker:mnode-fetch is initialized, min:1 max:1 09/08 16:50:57.200882 00932634 UTL worker:mnode-read is initialized, min:1 max:1 09/08 16:50:57.200924 00932634 UTL worker:mnode-write is initialized, min:1 max:1 09/08 16:50:57.200966 00932634 UTL worker:mnode-sync is initialized, min:1 max:1 09/08 16:50:57.201004 00932634 UTL worker:mnode-monitor is initialized, min:1 max:1 09/08 16:50:57.201056 00932634 DND node:mnode, has been opened 09/08 16:50:57.201075 00932634 DND node:vnode, start to open 09/08 16:50:57.201253 00932634 UTL worker:vnode-query is initialized, min:16 max:16 09/08 16:50:57.201258 00932634 UTL worker:vnode-stream is initialized, min:4 max:4 09/08 16:50:57.201265 00932634 UTL worker:vnode-mgmt is initialized, min:1 max:1 09/08 16:50:57.201308 00932634 UTL worker:vnode-monitor is initialized, min:1 max:1 09/08 16:50:57.201443 00932634 DND open 2 vnodes with 4 threads 09/08 16:50:57.203782 00932665 TSD ERROR vgId:3, tsdb scan and try fix fs failed since Data file corrupted 09/08 16:50:57.203793 00932665 TSD ERROR vgId:3, tsdb fs open failed since Data file corrupted 09/08 16:50:57.203800 00932665 VND ERROR vgId:3, failed to open vnode tsdb since No such file or directory 09/08 16:50:57.203854 00932665 DND ERROR vgId:3, failed to open vnode by thread:1 09/08 16:50:57.204535 00932664 SYN vgId:2, sync node use snapshot 09/08 16:50:57.205223 00932634 DND ERROR there are total vnodes:2, opened:1 09/08 16:50:57.205239 00932634 DND ERROR failed to open vnode since success 09/08 16:50:57.205243 00932634 DND ERROR failed to init vnodes-mgmt since success 09/08 16:50:57.205247 00932634 DND start to close all vnodes 09/08 16:50:57.205261 00932634 VND vgId:2, start to commit, commit ID:32 version:9531 09/08 16:50:57.206388 00932634 VND vgId:2, vnode info is saved, fname:/var/lib/taos/vnode/vnode2/vnode_tmp.json 09/08 16:50:57.206562 00932634 VND vgId:2, vnode info is committed 09/08 16:50:57.206706 00932634 VND vgId:2, commit end 09/08 16:50:57.209351 00932634 DND total vnodes:1 are all closed 09/08 16:50:58.198870 00932634 WAL wal module is cleaned up 09/08 16:50:58.198892 00932634 DND ERROR node:vnode, failed to open since Sync one replica 09/08 16:50:58.198897 00932634 DND ERROR node:vnode, failed to open since Sync one replica 09/08 16:50:58.198901 00932634 DND ERROR failed to open nodes since Sync one replica 09/08 16:50:58.198904 00932634 DND shutting down the service 09/08 16:50:58.400701 00932634 UDF udfd start to stop, need cleanup:0, spawn err:-2 09/08 16:50:58.699912 00932634 DND dnode env is cleaned up
shall we remote control your taosd environment to check this issue ?
If possible, we can chat via wechat. We can discuss how to access my destop remotely.
Sync one replica
15652223354 my wechat ,And I guess I've sent the request to you.
but it's a little bit late now. only 15 minutes before leaving the office. I will message you my contact details.
@yu285 same problem as mine. #16520 Can I also add your wechat and provide more information?
@yu285 same problem as mine. #16520 Can I also add your wechat and provide more information?
Of course ~