tarantool / vshard

The new generation of sharding based on virtual buckets
Other
100 stars 30 forks source link

replicaset: reconnect after fiber kill #356

Closed Serpentian closed 1 year ago

Serpentian commented 2 years ago

Currently if we kill net.box's fibers the connection goes into error_reconnect state. However, it's not reconnecting anymore.

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.

So, after fiber kill wait until it's really dead and make a request only after that.

Closes #341

Serpentian commented 2 years ago

Looks like the tests hangs on some runners. We should kill fibers more accurately and not just all net.box's ones. Will implement this tomorrow.

Serpentian commented 2 years ago

Actually, the problem was not about killing fibers. It was due to the the fact that in 2.7 - 2.9 conn.error has table type and we have to use conn.error.message in order to get that msg. In 1.10 and 2.10 conn.error is just a string.

Serpentian commented 2 years ago

The test fails on git version. It will be fixed as soon as https://github.com/tarantool/tarantool/pull/7468 is merged