replicaset: do not close initial conn during retryable error #638
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.
Before this patch the replicaset closed an initial netbox connection
during name check (
vconnectstage) when retryable error happened on thestorage side (
STORAGE_IS_DISABLED,NO_SUCH_PROC,AccessDeniedError).It was happening because
conn_vconnect_check_or_closeandconn_vconnect_wait_or_closefunctions didn't have the logic withretryable errors. This bug led to alerts on the router and as a result to
problems in high-level products which worked using vshard (e.g. TDG).
To fix this bug we introduce new replicaset helper functions -
conn_vconnect_is_retryable_errorandconn_vconnect_try_to_restart.They can help us to determine whether the error is retryable and restart
vconnect. We use it in
conn_vconnect_check_or_closeandconn_vconnect_wait_or_close.Also we delete one vconnect test -
test_vconnect_no_resultbecause ittests the behavior which is changed by our new patch.
Closes #632
NO_DOC=bugfix