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

fix(logs): cron delete old logs #2062

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bodinsamuel
Copy link
Contributor

Describe your changes

Fixes NAN-794

  • Cron: delete old logs (15 default retention)

@bodinsamuel bodinsamuel self-assigned this Apr 29, 2024
Copy link

linear bot commented Apr 29, 2024

@bodinsamuel bodinsamuel marked this pull request as ready for review April 29, 2024 09:37
Copy link
Collaborator

@TBonnin TBonnin left a comment

Choose a reason for hiding this comment

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

Can deleting old logs be done by dropping old indexes?

Copy link
Member

@khaliqgant khaliqgant left a comment

Choose a reason for hiding this comment

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

Looks good but curious about Thomas' question as well.

@bodinsamuel
Copy link
Contributor Author

Logs are currently stored in a single index, I didn't wanted to over engineer this rn and we often dont know how long a sync run so it would make the query a little more complexe to handle

@TBonnin
Copy link
Collaborator

TBonnin commented Apr 30, 2024

Logs are currently stored in a single index, I didn't wanted to over engineer this rn and we often dont know how long a sync run so it would make the query a little more complexe to handle

I think you can define a wildcard pattern to query over multiple indexes. This way we can have daily indexes (logs-20240430, logs-20240501, etc...) with a logs-* pattern. Couple that with an index lifetime management rules to drop indexes after 14 days.

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.

None yet

3 participants