-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Duration option causes Unavailable status if transport closed when request is active #121
Comments
Hello thanks for using ghz and inquiring about this. This behaviour happens when using the duration option because when the timeout happens we perform a stop which closes all connections. This causes any in-flight calls to terminate with either |
Hello, thanks for response. I get the reason for closing transport to prevent long calls, it makes perfect sense, but in that case results are a bit dirty with couple of errors at the end, which we would like to avoid as there are not real errors. If i may, these are a couple of thoughts of how to solve this inconvenience (for us at least):
Overall i think 2. can be a good solution: it introduces a new optional behavior that matches ours (and possibly others) expectations, while not changing how current configurations are run. About concerns of longer test runs, existing |
Another thought is to ignore results after duration end, for example by adding This way the reporter should exit right before connections are closed so no failed requests are reported. Benefit of this approach is that not extra configuration required, but after trying to implement it myself looks like this requires a bit more code changes than i expected, so probably not a best solution. |
Thanks for all the input and suggestions. I agree this can be improved. I'll think about the best approach, but right now I think I am leaning towards the ignore suggestion as it solves the issue of errors in results and accuracy of timing. But i'll think about it some more. |
@sanyokbig Please see #135 for a possible solution for this issue. |
@bojand This would be great, just what we need. |
Released in 0.42.0. If there are any problems please feel free to create a new issue. |
Proto file(s)
Command line arguments / config
Describe the bug
When ghz used with Duration option, any active request will fail at Duration end as connections are closed immediately, resulting in
Unavailable
code andrpc error: code = Unavailable desc = transport is closing
error.To Reproduce
go run .
ghz --config config.json
Unavailable
code.Expected behavior
7th result should return
OK
Environment
Possible Solution
Wait for all workers to exit before closing connections. We made this change locally and now it works as expected, i can provide PR with same changes is needed.
The text was updated successfully, but these errors were encountered: