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

UsageTracker: process created series events #10132

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

colega
Copy link
Contributor

@colega colega commented Dec 4, 2024

This adds a method to process series creation events, also a test that checks that it's compatible with the events produced.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega requested a review from a team as a code owner December 4, 2024 20:03
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Nice work! This was easy to review.

// processCreatedSeriesEvent creates the series coming from an event from Kafka,
// i.e. series that were created by a different instance.
// This does not check the limits, as we prioritize staying consistent across replicas over enforcing limits.
// Timestamp is not updated if series exists already.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't be updated with the highest value between the two? I guess it shouldn't happen, but never know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could happen but we don't really care as we'll update when we process the snapshot later.

pkg/usagetracker/tracker_store.go Outdated Show resolved Hide resolved
@colega colega merged commit 0693949 into usage-tracker Dec 5, 2024
9 checks passed
@colega colega deleted the usage-tracker-process-created-series-event branch December 5, 2024 08:44
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.

2 participants