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

Refactor: read sincedb time once per bucket listing #233

Merged
merged 3 commits into from
Dec 27, 2021

Conversation

kares
Copy link
Contributor

@kares kares commented Dec 27, 2021

instead of stat/open/read/close-ing the file on every iteration ...

This is expected to improve performance in terms of File operations, which is esp. useful when using network storage.

The only (minor) downside is we read the sincedb eagerly, even if there are no objects to be processed.

@kares kares marked this pull request as ready for review December 27, 2021 12:32
@kares kares self-assigned this Dec 27, 2021
Copy link
Contributor

@yaauie yaauie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we fully iterate over the bucket before we begin processing, it certainly makes sense to read the sincedb just once. Good catch.

LGTM 👍🏼

@kares kares merged commit 5768c61 into logstash-plugins:main Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants