-
Notifications
You must be signed in to change notification settings - Fork 180
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
Expose an API that allows events in the store to be cleared #850
Labels
enhancement
New feature or request
Comments
Hey @Aitchy13 Thanks for such a well documented enhancement idea. I will put this in our plans as it sounds very useful! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When events are blocked by the client or by the network it's connected to, the events that weren't able to be flushed continue to be written locally and grow every time a new event is triggered. Over time this can cause the user to have thousands of their events stored locally, waiting to be retried, which lead to slower reads and writes. We've noticed this performance bottleneck in our project, and have confirmed that clearing the events out for the user has immediately alleviate the performance issue they were having.
Proposed Solution
In this situation, it appears as though the
SegmentDestination
andQueueFlushingPlugin
have a handle on the store. As such, I propose that we expose methods that allow you to clear the store via those plugins.Below is small patch that exposes the necessary methods which allow you to clear the store yourself.
It would also be useful to expose methods that let you count how many events are in the store, so it is easier to get a handle on when you might want to clear the events out.
The text was updated successfully, but these errors were encountered: