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

Add the global concurrency-safe increment counter #58

Open
oleg-nenashev opened this issue Oct 9, 2023 · 3 comments
Open

Add the global concurrency-safe increment counter #58

oleg-nenashev opened this issue Oct 9, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@oleg-nenashev
Copy link
Member

Proposal

As a user for this plugin, I would like to use global counter, e.g. for IDs or for cursor-alike APIs. To do that, there should be a concurrency-safe increment logic, maybe offered as a handlebars Marco. Other similar methods would be nice as well

As a bonus point, it would be nice to use the storage API to ensure that it remains concurrency-safe even when HA-alike features re used, but I think it is for the future and needs API review together with @tomakehurst

References

No response

@oleg-nenashev oleg-nenashev added enhancement New feature or request help wanted Extra attention is needed labels Oct 9, 2023
@tomakehurst
Copy link
Member

I have an almost-ready PR on my laptop that makes use of the storage API. I've still got a couple of tests to fix but I can push it to a branch if anyone's interested in looking.

@oleg-nenashev
Copy link
Member Author

It would be great @tomakehurst !
Do not forget to register for Hacktoberfest too 👼

@dirkbolte
Copy link
Collaborator

Just reached this while trying to fix a bug with redundant updates: somehow I either need a lock or a concurrent update mechanism for a store which also works in HA. @tomakehurst if I can support in any way I'm happy to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants