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

Create a threadsafe cache store for processor #8662

Closed
ph opened this issue Oct 19, 2018 · 2 comments
Closed

Create a threadsafe cache store for processor #8662

ph opened this issue Oct 19, 2018 · 2 comments
Labels
discuss Issue needs further discussion. enhancement libbeat needs_team Indicates that the issue/PR needs a Team:* label Stalled

Comments

@ph
Copy link
Contributor

ph commented Oct 19, 2018

As we add more complex processors to beat a lot of them require some sort of caching mechanism to improve performance. Currently, all processors that need cache are implementing their own caching and their refresh mechanism.

Caching values in a processor require you to do a few stuff:

  • Clone values
  • Clone cache values
  • Add locking mechanism to cached Fields.
  • Trigger a refresh of the data either on-demand or by a goroutine.

There is no unique way across processors to cache values; this means that if anything of the above is not done correctly, we have the risk to generate a panic concerning concurrency when the events get serialized at the output.

The store should provide a single point of caching and refresh, and should take care of the concurrency.

Of course, it should be flexible enough to be used outside of the processor context.

@botelastic
Copy link

botelastic bot commented Jul 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added Stalled needs_team Indicates that the issue/PR needs a Team:* label labels Jul 9, 2020
@botelastic
Copy link

botelastic bot commented Jul 9, 2020

This issue doesn't have a Team:<team> label.

@botelastic botelastic bot closed this as completed Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issue needs further discussion. enhancement libbeat needs_team Indicates that the issue/PR needs a Team:* label Stalled
Projects
None yet
Development

No branches or pull requests

1 participant