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

[rrd4j] Fix database start time #15277

Merged
merged 1 commit into from Jul 20, 2023
Merged

[rrd4j] Fix database start time #15277

merged 1 commit into from Jul 20, 2023

Conversation

J-N-K
Copy link
Member

@J-N-K J-N-K commented Jul 20, 2023

Fixes #15270

The reason is that newly created RRD files are initialized with a timestamp of (now-1). When a lot of files are created, it may take longer than a second and the timestamp of the event and the timestamp of the creation are the same. I have now increased the start time offset to one step size (usually 10s).

Signed-off-by: Jan N. Klug <github@klug.nrw>
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of an add-on label Jul 20, 2023
@J-N-K J-N-K requested a review from a team as a code owner July 20, 2023 18:46
@jlaur
Copy link
Contributor

jlaur commented Jul 20, 2023

@J-N-K - thanks! Just to be sure: I can reproduce this consistently when creating a new item while my system is not particularly busy. So the problem, at least for me, is not only when creating a lot of files. Do you think this is the same issue as fixed by this PR?

@J-N-K
Copy link
Member Author

J-N-K commented Jul 20, 2023

I guess it really depends on timing. In my tests 8/10 times I ran into the error when linking a newly created item to a channel. After the fix it was 0/10.

@jlaur jlaur changed the title Fix rrd4j database start time [rrd4j] Fix database start time Jul 20, 2023
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@jlaur jlaur merged commit 0beaada into openhab:main Jul 20, 2023
3 checks passed
@jlaur jlaur added this to the 4.0 milestone Jul 20, 2023
@J-N-K J-N-K deleted the rrd4j branch July 20, 2023 19:45
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[rrd4j] Warnings generated on first store of item
2 participants