Skip to content

Conversation

@mrForza
Copy link
Contributor

@mrForza mrForza commented Jan 28, 2026

Before this patch the replicaset closed an initial netbox connection
during name check (vconnect stage) when retryable error happened on the
storage side (STORAGE_IS_DISABLED, NO_SUCH_PROC, AccessDeniedError).
It was happening because conn_vconnect_check_or_close and
conn_vconnect_wait_or_close functions didn't have the logic with
retryable 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_error and conn_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_close and
conn_vconnect_wait_or_close.

Also we delete one vconnect test - test_vconnect_no_result because it
tests the behavior which is changed by our new patch.

Closes #632

NO_DOC=bugfix

Before this patch the logic of discarding and nullification of
vconnect's future object was located only in `netbox_on_disconnect`
trigger. As in next patches we need to add this logic in other places,
we introduce a new replicaset function - `conn_vconnect_reset`.

Needed for tarantool#632

NO_TEST=refactoring
NO_DOC=refactoring
@mrForza mrForza force-pushed the mrforza/gh-632-connection-is-closed-during-init-connection branch 2 times, most recently from 38f481a to 445e990 Compare January 28, 2026 13:48
Before this patch the replicaset closed an initial netbox connection
during name check (`vconnect` stage) when retryable error happened on the
storage side (`STORAGE_IS_DISABLED`, `NO_SUCH_PROC`, `AccessDeniedError`).
It was happening because `conn_vconnect_check_or_close` and
`conn_vconnect_wait_or_close` functions didn't have the logic with
retryable 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_error` and `conn_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_close` and
`conn_vconnect_wait_or_close`.

Also we delete one vconnect test - `test_vconnect_no_result` because it
tests the behavior which is changed by our new patch.

Closes tarantool#632

NO_DOC=bugfix
@mrForza mrForza force-pushed the mrforza/gh-632-connection-is-closed-during-init-connection branch from 445e990 to e9f3a13 Compare January 28, 2026 16:07
@mrForza mrForza requested a review from Serpentian January 28, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connection is closed during name check on initial connection, when retryable error happens

2 participants