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

Add tests for the dispatcherMaxRoundRobinBatchSize config #24094

Open
1 of 2 tasks
BewareMyPower opened this issue Mar 19, 2025 · 3 comments · May be fixed by 3pacccccc/pulsar#1 or #24117
Open
1 of 2 tasks

Add tests for the dispatcherMaxRoundRobinBatchSize config #24094

BewareMyPower opened this issue Mar 19, 2025 · 3 comments · May be fixed by 3pacccccc/pulsar#1 or #24117
Assignees
Labels
good first issue Good for newcomers type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@BewareMyPower
Copy link
Contributor

BewareMyPower commented Mar 19, 2025

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

This config limits the max number of entries to dispatch for a Shared or Key_Shared subscription. However, there is no related test, so a regression could be introduced.

See

private int dispatcherMaxRoundRobinBatchSize = 20;

I added a TODO here:

// TODO: add tests to verify dispatcherMaxRoundRobinBatchSize is respected

If this line was changed like:

            int maxEntriesInThisBatch =
                            // use the average batch size per message to calculate the number of entries to
                            // dispatch. round up to the next integer without using floating point arithmetic.
                            (maxMessagesInThisBatch + avgBatchSizePerMsg - 1) / avgBatchSizePerMsg);

no tests will fail. This is dangerous because there is no test that guarantees the config works

Solution

No response

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@BewareMyPower BewareMyPower added good first issue Good for newcomers type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages labels Mar 19, 2025
@3pacccccc
Copy link
Contributor

i'm interest in this issue, assign to me please.

@jojowyh
Copy link

jojowyh commented Mar 21, 2025

I'm new to an open source project in China, and I would like to participate in this issue as well

@BewareMyPower
Copy link
Contributor Author

BewareMyPower commented Mar 23, 2025

I see @jojowyh already pushed a PR, so I assigned this issue to him for now. I left a requested change here: #24110 (comment) and I also updated this issue description.

@3pacccccc If you're also interested in this issue, welcome to push a PR as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
3 participants