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

UfAlerts sometimes fail to delete old alerts #633

Closed
lcharette opened this issue Feb 2, 2017 · 6 comments
Closed

UfAlerts sometimes fail to delete old alerts #633

lcharette opened this issue Feb 2, 2017 · 6 comments
Assignees
Labels
confirmed bug Something isn't working
Milestone

Comments

@lcharette
Copy link
Member

UfAlerts may randomly fail to delete old alerts and show old alerts on top of new ones when a page is loaded. This has been linked to the alerts being stored in session files since those files are read and written too often in rapid succession. This may cause overlapping of multiple read and write operations.

A proposed fix for this would be to move ufAlerts from the session storage to the cache storage.

@lcharette lcharette added confirmed bug Something isn't working V4 labels Feb 2, 2017
@lcharette lcharette added this to the 4.0 milestone Feb 2, 2017
@lcharette lcharette self-assigned this Feb 2, 2017
@lcharette
Copy link
Member Author

I managed to somehow successfully replicate by adding multiple addMessageTranslated in a controller ___construct and refreshing twice.

To fix this, a user cache service would need to be added to the existing cache service so it will be easier to associate alerts to a user. The problem is such a user cache also need to be available for guest (non-logged in) users... So probably a session cache and/or user cache...

@Silic0nS0ldier
Copy link
Member

Wouldn't a cache be victim to the same issue?

@lcharette
Copy link
Member Author

Not really. Everything goes down to race condition. Session file is written every time the request is done. Config is written when you modify it.

@lcharette
Copy link
Member Author

This is implemented in 4.1. As discussed with @alexweissman, the session based alertStream will still be default for now, but if this problem surface again, it can be easily changed in the config values.

@ktecho
Copy link
Contributor

ktecho commented Feb 1, 2020

I'm experiencing this too. Seems to be fixed by changing to cache.

@lcharette
Copy link
Member Author

At this point we should probably just make cache the default...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants