forked from tarantool/vshard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replicaset: reconnect after fiber kill
Currently if we kill the worker fiber of the connection, which was initialized with 'reconnect_after' option, this connection goes into 'error_reconnect' or 'error' state (depends on tarantool version). Reconnecting doesn't happen in both cases and the only way for user to return router to working order is reloading or manual restoring of the connections. This patch introduces reconnecting in that case. It should be used wisely, though. Fiber's killing doesn't happen instantly and if the user doesn't wait util fiber's status is 'dead' and makes the request immediately, exception will be probably thrown as the fiber can die in the middle of request. However, reconnecting doesn't happen automatically in tarantool 2.10.0, as there's no way to determine if the fiber is dead other than checking the error message of the connection, which is not a good practice as this check can be easily trigerred false-positively. Closes tarantool#341
- Loading branch information
1 parent
3b3a909
commit d845ba1
Showing
3 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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