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

feat: introduce LogQueue abstraction to simplify the race condition #170

Merged
merged 7 commits into from
May 20, 2022

Conversation

MrCroxx
Copy link
Owner

@MrCroxx MrCroxx commented May 20, 2022

What changes were proposed in this pull request?

As titled.

Besides, this PR also tried use read_at and write_at to avoid locking a fd. But currently tokio doesn't support read_at or write_at for now. So, it's needed to use tokio::task::spawn_blocking with std::fs::File and communicate with tokio::sync::oneshot. But after benching the approach, it's found that the jitter of the latency is extremely high. So I abandon the implementation. You can found them in the commit logs if you are interested.

Which issues is this PR related to?

#160

@MrCroxx MrCroxx added the feature New feature. label May 20, 2022
@MrCroxx MrCroxx self-assigned this May 20, 2022
@MrCroxx MrCroxx enabled auto-merge (squash) May 20, 2022 10:45
@MrCroxx MrCroxx merged commit 6356adc into main May 20, 2022
@MrCroxx MrCroxx deleted the xx/log-queue branch May 20, 2022 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant