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

[mapdb] Persistence service blocks item notifications #14899

Closed
J-N-K opened this issue Apr 28, 2023 · 8 comments · Fixed by #14900
Closed

[mapdb] Persistence service blocks item notifications #14899

J-N-K opened this issue Apr 28, 2023 · 8 comments · Fixed by #14900
Assignees
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@J-N-K
Copy link
Member

J-N-K commented Apr 28, 2023

MapDB block item thread pool when a lot of states are stored.

Discovered in openhab/openhab-core#3578

@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of an add-on label Apr 28, 2023
@J-N-K J-N-K self-assigned this Apr 28, 2023
@J-N-K J-N-K changed the title [mapdb] [mapdb] Persistence service blocks item notifications Apr 28, 2023
@J-N-K
Copy link
Member Author

J-N-K commented Apr 28, 2023

@openhab/add-ons-maintainers It could be that this also affects other persistence add-ons. Someone might want to check that.

@jlaur
Copy link
Contributor

jlaur commented Apr 28, 2023

@J-N-K - thanks for sharing, I have checked jdbc, and it also suffers from this problem. It even makes synchronous network calls during store.

@J-N-K
Copy link
Member Author

J-N-K commented Apr 28, 2023

That's similar to what influxdb does.

@lolodomo
Copy link
Contributor

lolodomo commented May 1, 2023

I just have a quick look to rrd4j persistence service and the store of data is synchronous too. So I guess it should be also fixed.

PS: you made an incredible discovery @J-N-K , strange that it was not detected before.

@J-N-K J-N-K added this to the 4.0 milestone May 1, 2023
@florian-h05
Copy link
Contributor

PS: you made an incredible discovery @J-N-K , strange that it was not detected before.

I had serious performance issues where groups nearly completely missed state updates from their members, so thanks again for finding the root cause @J-N-K!

@J-N-K
Copy link
Member Author

J-N-K commented May 1, 2023

Similar issues were already reported earlier, but the reports did not contain enough information to find it. I believe that at least some of the issues like openhab/openhab-core#3531 have similar reasons.

@lolodomo
Copy link
Contributor

lolodomo commented May 1, 2023

I had serious performance issues where groups nearly completely missed state updates from their members

It happened when you had a massive number of state updates, is that correct ?

The problem is that all persistence services have probably to be updated. Priority should be RRD4J which is the default persistence service and so probably used by most users, and the most used persistence services (JDBC is probably one of them).

@florian-h05
Copy link
Contributor

Similar issues were already reported earlier, but the reports did not contain enough information to find it.

Then I'm glad I was able to provide enough information!

It happened when you had a massive number of state updates, is that correct ?

Correct. e.g when I turned my light Florian_Licht on/off, the F2_Florian_Licht, F2_Florian, gLicht groups were informed, which are nested in other groups, and for each Item the PersistenceManager as well. This lead to peaks of over 30 listeners to get informed in one second, which were scheduled but never executed because the thread was too busy with persistence. Seehttps://github.com/openhab/openhab-core/issues/3578 for more information.

The problem is that all persistence services have probably to be updated. Priority should be RRD4J which is the default persistence service

As Jan said in the core issue, the problem is that the persistence services did not implement PersistenceService.store well, see openhab/openhab-core#3578 (comment).

And I agree that RRD4J should be the top priority.

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 a pull request may close this issue.

4 participants