[improve][txn] Handle changeToReadyState failure correctly in TC client#19308
Merged
BewareMyPower merged 2 commits intoapache:masterfrom Jan 27, 2023
Merged
Conversation
### Motivation If `changeToReadyState` returns false when receiving the `CommandTcClientConnectResponse`, the connection will be closed but the `TransactionMetaStoreHandler` will still be registered. ### Modifications Add a `registerToConnection` method to handle the case when `changeToReadyState` returns false. In this case, we should fail fast, so complete the `connectFuture` exceptionally and does not register the `TransactionMetaStoreHandler` to `ClientCnx`.
liangyepianzhou
approved these changes
Jan 24, 2023
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19308 +/- ##
============================================
- Coverage 63.54% 62.73% -0.81%
- Complexity 3615 25557 +21942
============================================
Files 1895 1818 -77
Lines 137475 133078 -4397
Branches 15091 14635 -456
============================================
- Hits 87355 83490 -3865
+ Misses 42240 41857 -383
+ Partials 7880 7731 -149
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
aymkhalil
approved these changes
Jan 25, 2023
Technoboy-
pushed a commit
that referenced
this pull request
Feb 8, 2023
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Feb 28, 2023
…nt (apache#19308) (cherry picked from commit 644be5f) (cherry picked from commit ddb94aa)
Annavar-satish
pushed a commit
to pandio-com/pulsar
that referenced
this pull request
Mar 6, 2023
…nt (apache#19308) (cherry picked from commit 644be5f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
If
changeToReadyStatereturns false when receiving theCommandTcClientConnectResponse, the connection will be closed but theTransactionMetaStoreHandlerwill still be registered.Modifications
Add a
registerToConnectionmethod to handle the case whenchangeToReadyStatereturns false. In this case, we should fail fast, so complete theconnectFutureexceptionally and does not register theTransactionMetaStoreHandlertoClientCnx.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: BewareMyPower#18