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

completeStreaming() without waiting throws exception #352

Open
georgi-l95 opened this issue Nov 18, 2024 · 1 comment
Open

completeStreaming() without waiting throws exception #352

georgi-l95 opened this issue Nov 18, 2024 · 1 comment
Labels
Simulator Issue related to Block Stream Simulator
Milestone

Comments

@georgi-l95
Copy link
Member

georgi-l95 commented Nov 18, 2024

As a block simulator operator
I want to be able to stop, without waiting fixed amount of time
So that I achieve cleaner code and faster test execution.

Problem

Currently we are waiting 100 ms before continuing with the flow of stopping the simulator, right after we call onComplete in the publisher client. This is because otherwise, stream is not closed on time and this is causing issues.
https://github.com/hashgraph/hedera-block-node/blob/v0.3.1/simulator/src/main/java/com/hedera/block/simulator/grpc/impl/PublishStreamGrpcClientImpl.java#L160

Solution

Find a suitable solution for this behavior.

@georgi-l95 georgi-l95 added the Simulator Issue related to Block Stream Simulator label Nov 18, 2024
@georgi-l95 georgi-l95 added this to the 0.4.0 milestone Nov 18, 2024
@georgi-l95 georgi-l95 changed the title onComplete without waiting throws exception completeStreaming() without waiting throws exception Nov 18, 2024
@jsync-swirlds
Copy link
Contributor

Just a thought.
Could we submit a Task to the common fork/join pool (ForkJoinPool.commonPool() ) and let it complete asynchronously?
That task, then, can check stream status and take as long as it needs to (but no longer) without the main thread having to wait.

@AlfredoG87 AlfredoG87 modified the milestones: 0.4.0, 0.5.0 Feb 13, 2025
@AlfredoG87 AlfredoG87 modified the milestones: 0.5.0, 0.6.0 Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simulator Issue related to Block Stream Simulator
Projects
None yet
Development

No branches or pull requests

3 participants