Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Conversation

cyriltovena
Copy link
Collaborator

@cyriltovena cyriltovena commented Jun 8, 2023

This PR makes flushing row groups of profiles asynchronously and outside of the read path.

Only one flushing can happen at once. This should drastically reduce the tail latency.

image

While working on this I realised we have a race between queries getting queriers (head and disk) and flushing row groups

I believe this could be the source of:

I decided to not fix this in this PR as it requires a larger refactoring.

@cyriltovena
Copy link
Collaborator Author

Deployed in dev for an hour or so
image

@kolesnikovae
Copy link
Contributor

While working on this I realised we have a race between queries getting queriers (head and disk) and flushing row groups

Do you have a stack trace of the race? I'd like to look into it

@cyriltovena
Copy link
Collaborator Author

While working on this I realised we have a race between queries getting queriers (head and disk) and flushing row groups

Do you have a stack trace of the race? I'd like to look into it

It's not really a race per say, but remove https://github.com/grafana/phlare/pull/760/files#diff-0db51ea7d6410dc44713dbafff69e0b0fe2c41b106f762be6dd039b3a984b719R367-R373 and run the tests it will fail from time to time or all the time.

Copy link
Contributor

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

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

LGTM! 👏🏻

@cyriltovena cyriltovena merged commit faf62ed into main Jun 8, 2023
@cyriltovena cyriltovena deleted the async-flushrowgroup branch June 8, 2023 15:38
simonswine pushed a commit to simonswine/pyroscope that referenced this pull request Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.