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

Only append tailed entries if needed. #2931

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

cyriltovena
Copy link
Contributor

This avoid to doing allocations on slices when there is no tailers.

We could potentially pooled the slice too but the tailing code is using the stream in an
async fashion so we can't put it back.

Signed-off-by: Cyril Tovena cyril.tovena@gmail.com

This avoid to doing allocations on slices when there is no tailers.

We could potentially pooled the slice too but the tailing code is using the stream in an
async fashion so we can't put it back.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@slim-bean slim-bean added this to the 2.1 milestone Nov 17, 2020
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

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

Nice

}
}

type noopChunk struct {
Copy link
Member

Choose a reason for hiding this comment

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

Could we just expose dumbChunk instead from the chunkenc pkg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dumbchunk does allocation which makes some noise in the benchmark.

@cyriltovena cyriltovena merged commit 14a5fda into grafana:master Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants