Skip to content

Add simple TTL for target manager cache #1678

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

Merged
merged 6 commits into from
May 15, 2025
Merged

Add simple TTL for target manager cache #1678

merged 6 commits into from
May 15, 2025

Conversation

jefchien
Copy link
Contributor

@jefchien jefchien commented May 8, 2025

Description of the issue

If a log group gets deleted after it's been cached by the target manager, then it will never get recreated and logs will not be sent.

Description of changes

Adds a simple TTL check so if another request comes in for the same target, it will try again. InitTarget is only ever called when the log group or stream doesn't exist, so it isn't a common call.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Updated unit tests.

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

@jefchien jefchien requested a review from a team as a code owner May 8, 2025 22:25
@jefchien jefchien force-pushed the recreate-log-group branch from 9d349c2 to f71c61e Compare May 14, 2025 15:24
movence
movence previously approved these changes May 14, 2025
@jefchien jefchien merged commit 248cb9b into main May 15, 2025
168 of 169 checks passed
@jefchien jefchien deleted the recreate-log-group branch May 15, 2025 18:15
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