-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Cursor input old state collection #19528
Conversation
Pinging @elastic/integrations-services (Team:Services) |
|
||
keys := gcFind(states.table, started, time.Now()) | ||
if len(keys) == 0 { | ||
log.Debug("No entries to remove found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "were found"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the CI is happy, I am happy.
1d2ac73
to
239451e
Compare
The change provides the collection and deletion support for old states. All entries added to the store have a TTL configured. A key-value pair will be removed from the store once the most recent update timestamp + TTL < now. Pairs with pending updates will not be deleted yet. The collector currently only implements the logic for the clean_inactive setting. In comparison to the old registar, is the TTL not reset on startup. Old entries are still subject to collection, even if they've not been claimed. The TTL will be updated by the InputManager if an input with a different TTL is started for an already seen source. The full list of changes will include: - Introduce v2 API interfaces - Introduce [compatibility layer](https://github.com/urso/beats/tree/fb-input-v2-combined/filebeat/input/v2/compat) to integrate API with existing functionality - Introduce helpers for writing [stateless](https://github.com/urso/beats/blob/fb-input-v2-combined/filebeat/input/v2/input-stateless/stateless.go) inputs. - Introduce helpers for writing [inputs that store a state](https://github.com/urso/beats/tree/fb-input-v2-combined/filebeat/input/v2/input-cursor) between restarts. - Integrate new API with [existing inputs and modules](https://github.com/urso/beats/blob/fb-input-v2-combined/filebeat/beater/filebeat.go#L301) in filebeat.
239451e
to
7d3cf5e
Compare
The change provides the collection and deletion support for old states. All entries added to the store have a TTL configured. A key-value pair will be removed from the store once the most recent update timestamp + TTL < now. Pairs with pending updates will not be deleted yet. The collector currently only implements the logic for the clean_inactive setting. In comparison to the old registar, is the TTL not reset on startup. Old entries are still subject to collection, even if they've not been claimed. The TTL will be updated by the InputManager if an input with a different TTL is started for an already seen source.
The change provides the collection and deletion support for old states. All entries added to the store have a TTL configured. A key-value pair will be removed from the store once the most recent update timestamp + TTL < now. Pairs with pending updates will not be deleted yet. The collector currently only implements the logic for the clean_inactive setting. In comparison to the old registar, is the TTL not reset on startup. Old entries are still subject to collection, even if they've not been claimed. The TTL will be updated by the InputManager if an input with a different TTL is started for an already seen source.
What does this PR do?
The change provides the collection and deletion support for old states.
All entries added to the store have a TTL configured. A key-value pair
will be removed from the store once the most recent update timestamp + TTL < now.
Pairs with pending updates will not be deleted yet.
The collector currently only implements the logic for the clean_inactive setting.
In comparison to the old registar, is the TTL not reset on startup. Old
entries are still subject to collection, even if they've not been
claimed. The TTL will be updated by the InputManager if an input with a
different TTL is started for an already seen source.
The full list of changes will include:
Why is it important?
Implement old state cleanup support for statefull inputs.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
run unit tests via
$ go test
Related issues