Skip to content

Conversation

@liran-funaro
Copy link
Contributor

@liran-funaro liran-funaro commented Sep 16, 2025

Type of change

  • Bug fix

Description

  • Fix bug in load-geneator: Close broadcast streams only after the workload has completed.
    This ensures that any pending messages in the stream’s internal queue are fully processed. Even if all transactions have already been submitted, additional time may be required for them to be transmitted.
  • Use a connection cache when opening all the connections in the connection manager to avoid re-opening the same connection multiple times.
  • Fix broken rebase from prior commit.

Related issues

Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
@liran-funaro liran-funaro requested a review from cendhu September 16, 2025 09:51
@liran-funaro liran-funaro added bug Something isn't working testing labels Sep 16, 2025
@liran-funaro liran-funaro changed the title [flaky-test] Only close broadcast workers once the workload ends [flaky-test] Only close broadcast streams once the workload ends Sep 16, 2025
@liran-funaro liran-funaro changed the title [flaky-test] Only close broadcast streams once the workload ends [flaky-test] Close broadcast streams only after the workload has completed Sep 16, 2025
@liran-funaro liran-funaro changed the title [flaky-test] Close broadcast streams only after the workload has completed [loadgen] Close broadcast streams only after the workload has completed Sep 16, 2025
Copy link
Contributor

@cendhu cendhu left a comment

Choose a reason for hiding this comment

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

LGTM.

defer dCancel()
g, gCtx := errgroup.WithContext(dCtx)
for _, stream := range streams {
stream := stream
Copy link
Contributor

Choose a reason for hiding this comment

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

The loop variable scope has been fixed since go 1.22 -- https://go.dev/blog/loopvar-preview#the-fix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great! I wasn't aware.

@cendhu cendhu merged commit 9c38c5c into hyperledger:main Sep 17, 2025
12 checks passed
@liran-funaro liran-funaro deleted the fix-test-loadgen-orderer branch September 17, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flaky test] TestLoadGenForOnlyOrderer/block=5,tx=2500

2 participants