You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function `vshard.router.routeall` is not marked as internal API, but
it returns `router.replicasets` table, which is used by the router itself.
And also `vshard.router.route` returns a replicaset object that is used
internally. If user modifies the returned from `routeall` or `route`
table, then router is broken and cannot continue to work properly after
that.
Now `routeall` returns a new copy of the replicaset array to user on
each call. So user can do whatever he wants with this array, without
affecting the internal behavior of the router.
Also, each of the replicasets that are returned from `routeall` or `route`
is a wrapper over the internal replicaset table. This wrapper contains the
private field `_replicaset`, the value of which is the internal replicaset
table. User should not touch this field. This wrapper only gives user
access to the public replicaset methods: `call`, `callrw`, `callro`,
`callbro`, `callre`, `callbre`.
Closes#502
NO_DOC=<undocumented part>
0 commit comments