Skip to content

Add support for sending commands in batches#158

Merged
zuiderkwast merged 5 commits intoEricsson:single-process-clientfrom
WilliamVoong:victor/single-process-client
Mar 17, 2026
Merged

Add support for sending commands in batches#158
zuiderkwast merged 5 commits intoEricsson:single-process-clientfrom
WilliamVoong:victor/single-process-client

Conversation

@WilliamVoong
Copy link
Collaborator

@WilliamVoong WilliamVoong commented Feb 27, 2026

When the pending queue is full, don't send more commands until the pending queue can fit another batch of commands, as configured with the existing config batch_size.

The purpose is to improve performance by sending fewer and larger TCP packets.

The config for batch_size has existed before but the batching functionality has not worked properly.

Bonus: Use assert macros instead of direct pattern matching in eunit tests to verify output/input, to get better error messages on failure.

* Bonus:
        Avoid pattern matching in
        eunit tests to verify output/input,
        leads to ambigious function clause
        errors when clause does not match.

Change-Id: I9e234753c424e520c4d388039919aebc1c1f93f6
@zuiderkwast zuiderkwast self-requested a review March 2, 2026 14:26
Copy link
Collaborator

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Imlementation looks good. I have some comments about naming and style.

I don't see any tests where pending reaches the maximum and we start building up batches. Is this already covered in some cluster test? If not, we should probably do it in ered_client_tests.

@zuiderkwast zuiderkwast changed the title Add support for sending batched data. Add support for sending batched data Mar 2, 2026
@WilliamVoong WilliamVoong force-pushed the victor/single-process-client branch from cba9b6d to 04f65f9 Compare March 16, 2026 07:52
 * Add a low-high watermark test
 * rename variables
 * rewrite functions to match queue API
@WilliamVoong WilliamVoong force-pushed the victor/single-process-client branch from 04f65f9 to 27bc752 Compare March 16, 2026 08:29
Copy link
Collaborator

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Looks great now. Only very minor comments now.

William Voong added 2 commits March 16, 2026 14:51
* Fix wrong types in docs and code.
* Make low_high_watermark test more complete.
* Some small refactoring in ered_client_tests
* Add some docs for filling_batch.
@zuiderkwast zuiderkwast changed the title Add support for sending batched data Add support for sending commands in batches Mar 17, 2026
@zuiderkwast zuiderkwast merged commit 641c7e3 into Ericsson:single-process-client Mar 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants