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

The refresh time for statistics in NebulaGraph Studio 3.6.0 is incorrect. #548

Open
50133142 opened this issue May 11, 2023 · 3 comments
Open
Assignees
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected

Comments

@50133142
Copy link

版本:nebula-graph-studio-3.6.0
统计刷新时间不对
image

查看schema刷新时间倒是正确的
image

@hetao92
Copy link
Contributor

hetao92 commented May 17, 2023

这里的逻辑不太一样,统计页面使用 show stats 等内核的 job 语句来获取信息,时间也是内核启动时定义的时间,没有特殊配置的话就是和东八区差八个小时,查看 schema 这里是 studio 自己的执行逻辑,所以会以当地时间来记录。这块我们后续会优化一下

@yyh0808
Copy link
Contributor

yyh0808 commented May 23, 2023

内核的机器和你电脑本地时区不一致?

@huaxiabuluo huaxiabuluo added the type/bug Type: something is unexpected label Jun 5, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Jun 5, 2023
@QingZ11 QingZ11 changed the title ebula-graph-studio-3.6.0 统计刷新时间不对 The refresh time for statistics in NebulaGraph Studio 3.6.0 is incorrect. Sep 18, 2023
@huaxiabuluo
Copy link
Contributor

huaxiabuluo commented Nov 7, 2023

问题原因

基础库 nebula-go 在做时间转换时,将标准时间转换为了本地时间字符串 2023-01-01T00:00:01.000000 格式,忽略了 TZD(time zone designator) 时区标志
https://github.com/vesoft-inc/nebula-go/blob/master/value_wrapper.go#L347
假如 graphd/meta/storage 默认采用的是 UTC+00:00 的零时区时间,而浏览器所在系统采用的是东八区(UTC+08:00)时间,缺少 TZD 的字符串 2023-01-01T00:00:01.000000 传递到浏览器后,会默认被当成浏览器本地时间处理(见 IOS 8601 规范),和真实的东八区时间相差 8 个小时。

处理方法

  1. 可通过修改 graphd 服务配置 doctimezone_nameUTC+08:00 来快速规避问题
  2. 等待后续产品升级修复

Issue Cause

The base library, nebula-go, converts standard time to a local time string format 2023-01-01T00:00:01.000000, neglecting the TZD (time zone designator).
https://github.com/vesoft-inc/nebula-go/blob/master/value_wrapper.go#L347
If the default time for graphd/meta/storage is UTC+00:00, and the system where the browser is located uses the East 8 Zone (UTC+08:00) time, the string 2023-01-01T00:00:01.000000 without TZD, when passed to the browser, will be treated as the browser's local time by default (see IOS 8601 standard), differing from the actual East 8 Zone time by 8 hours.

Solution

  • A quick workaround is to change the timezone_name in the graphd service configuration document to UTC+08:00, doc.
  • Awaiting subsequent product upgrades for a permanent fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

4 participants