-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
callro should route requests to the master, but instead routes them to the replica #488
Comments
I cannot reproduce the behavior you're describing. A router still goes to master for me by default: We have a basic example of vshard cluster in
Here's the config: {
sharding = {
['cbf06940-0790-498b-948d-042b62cf3d29'] = { -- replicaset #1
replicas = {
['8a274925-a26d-47fc-9e1b-af88ce939412'] = {
uri = 'storage:[email protected]:3301',
name = 'storage_1_a',
master = true
},
['3de2e3e1-9ebe-4d0d-abb1-26d301b84633'] = {
uri = 'storage:[email protected]:3302',
name = 'storage_1_b'
}
},
}, -- replicaset #1
['ac522f65-aa94-4134-9f64-51ee384f1a54'] = { -- replicaset #2
replicas = {
['1e02ae8a-afc0-4e91-ba34-843a356b8ed7'] = {
uri = 'storage:[email protected]:3303',
name = 'storage_2_a',
master = true
},
['001688c3-66f8-4a31-8e19-036c17d489c2'] = {
uri = 'storage:[email protected]:3304',
name = 'storage_2_b'
}
},
}, -- replicaset #2
}, -- sharding
replication_connect_quorum = 0,
} Please, check, that weight of master is >= than weight of replica, if you use zones for configuring vshard. Please, check log messages for errors, router will go to replica instead of master in callro if connection is down or 3 sequential requests fails. But with properly working replicasets and correctly configured weights |
I prepared more structured repro.
|
Seems like a bug in new vshard.
Previously (in Tarantool 2 clusters), callro always route requests to master: when I called
require('vshard').router.callro(1, 'dostring', {'return box.info.uuid'})
I always got the id of master.Now when I use Tarantool 3 cluster and vshard version 0.1.28, when I call
vshard.router.callro(1, 'dostring', {'return box.info.uuid'})
I get the replica id.This kind of breaks some logic in the crud module: under the hood, when we call crud.select with preference_replica=false and balance = false, it calls the callro method, but now it leads to the replica
The text was updated successfully, but these errors were encountered: