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

check the current timestamp, MUST more than the last save timestamp #278

Open
edwardhey opened this issue Jan 30, 2024 · 4 comments
Open

Comments

@edwardhey
Copy link

edwardhey commented Jan 30, 2024

image

从1.1.2版本开始在32位的机器上使用时间戳来写入数据,不允许同一秒写入相同数据了么?这是出于什么方面考虑的呀?

@jingfengLu
Copy link

关注一下,同样有1s内多条写入的需求。

@armink
Copy link
Owner

armink commented Mar 5, 2024

为了避免插入同样时间,但内容不一致的数据

如果遇到这个问题,可以修改 get_time 的时间戳获取精度,默认是秒级,可以改为毫秒级

@Elsa-is-My-Muse
Copy link

为了避免插入同样时间,但内容不一致的数据

如果遇到这个问题,可以修改 get_time 的时间戳获取精度,默认是秒级,可以改为毫秒级

朱总,这个问题感觉不太好处理,如果使用ms,因为cur_time是int32的,那么此刻应该发生溢出了。如果发生溢出根据代码逻辑,应该是一条都存不了~~!

@armink
Copy link
Owner

armink commented May 29, 2024

为了避免插入同样时间,但内容不一致的数据
如果遇到这个问题,可以修改 get_time 的时间戳获取精度,默认是秒级,可以改为毫秒级

朱总,这个问题感觉不太好处理,如果使用ms,因为cur_time是int32的,那么此刻应该发生溢出了。如果发生溢出根据代码逻辑,应该是一条都存不了~~!

时间戳是可以设置为 64bit 的,开启一下 FDB_USING_TIMESTAMP_64BIT

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

No branches or pull requests

4 participants