fix: cancel even when vrpc is not started yet and fix newRealCall#2897
fix: cancel even when vrpc is not started yet and fix newRealCall#2897mutianf merged 4 commits intogoogleapis:mainfrom
Conversation
Change-Id: I81320830192df0cd16f405487c25b5dcb28985fe
|
|
||
| if (!status.isOk()) { | ||
| if (!state.compareAndSet(State.STARTED, State.CLOSED)) { | ||
| return; |
There was a problem hiding this comment.
The return is missing now. It was here to protect from the race with handleSessionClose, right? Then we should keep it.
There was a problem hiding this comment.
it'll now throw an exception if the state is not started. see here: https://github.com/googleapis/java-bigtable/blob/main/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DebugTagTracer.java#L27
There was a problem hiding this comment.
oh. Do we want a user to have an exception if starting a call coincides with session closing? Am I missing something?
There was a problem hiding this comment.
Hmm, I think this only prevents double start of an vrpc which should never happen? session closing should be handled here: https://github.com/googleapis/java-bigtable/blob/main/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcImpl.java#L140 which we only log a warning if the state is not correct.
Change-Id: I1064ff6be95987c994360119c832e9e55abe60e5
Change-Id: I65308166955609dfc08ee0fec13987b469683dd0
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.