-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add count to 'loki_ingester_memory_chunks' when recovery from wal #4272
Conversation
|
||
if len(s.chunks) != prevNumChunks { | ||
memoryChunks.Add(float64(len(s.chunks) - prevNumChunks)) | ||
} |
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.
This code should be executed before the failure handling because some chunks may be stored in memory even if others is failed
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.
Great catch!
16cc774
to
8e361af
Compare
8e361af
to
92ca322
Compare
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.
This looks great :). Sorry it took so long for me to review it.
|
||
if len(s.chunks) != prevNumChunks { | ||
memoryChunks.Add(float64(len(s.chunks) - prevNumChunks)) | ||
} |
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.
Great catch!
What this PR does / why we need it:
"loki_ingester_memory_chunks" isn't incremented when WAL recovery is executed so I've fixed.
Which issue(s) this PR fixes:
Fixes #4004