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

refactor(stream): send barriers in batch when possible #19932

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Revert "SmallVec"

a45de93
Select commit
Loading
Failed to load commit list.
Open

refactor(stream): send barriers in batch when possible #19932

Revert "SmallVec"
a45de93
Select commit
Loading
Failed to load commit list.
Task list completed / task-list-completed Started 2025-01-17 07:27:14 ago

0 / 1 tasks completed (+7 optional)

1 task still to be completed (+7 optional)

Details

Required Tasks

Task Status
A batch of barriers only requires 1 barrier permit, consequently there're less permits to add back. Incomplete
Although the total number of messages remains unchanged for the MergeExecutor, the cost of polling a message can be reduced due to this very simple new state in the auto-generated future, i.e. less useless poll::pending. Incomplete
I have written necessary rustdoc comments. Incomplete
Barrier batching alleviates the barrier issue. Incomplete
Even with barrier batching, the source throughput is suboptimal—10,000 rows per second in the figure compared to the 100,000 rows per second defined by the source. This discrepancy arises because the system is not fully utilizing the CPUs for processing actual stream jobs; instead, it's dedicating resources to handling barriers. This is expected, as the barrier batching approach is reactive, intervening only when barrier overhead begins to drain CPU resources and create issues. Incomplete
grpc/grpc-go#524 Incomplete
grpc/grpc-dotnet#2074 Incomplete
A batch of barriers only requires 1 barrier permit, consequently there're less permits to add back. Incomplete
Although the total number of messages remains unchanged for the MergeExecutor, the cost of polling a message can be reduced due to this very simple new state in the auto-generated future, i.e. less useless poll::pending. Incomplete
Poll one msg. Incomplete
Peek N consecutive barriers, only if the lastest msg is non-mutation barrier. Incomplete
Send the batch msg. Incomplete

Optional Tasks

Task Status
I have added necessary unit tests and integration tests. Incomplete
I have added test labels as necessary. Incomplete
I have added fuzzing tests or opened an issue to track them. Incomplete
My PR contains breaking changes. Incomplete
My PR changes performance-critical code, so I will run (micro) benchmarks and present the results. Incomplete
My PR contains critical fixes that are necessary to be merged into the latest release. Incomplete
My PR needs documentation updates. Incomplete