tarantool / vshard

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

router: auto and manual enable/disable #342

Closed Serpentian closed 2 years ago

Serpentian commented 2 years ago

This patch introduces protecting router's API while its configuration is not done as accessing these functions at that time is not safe and can cause low level errors like 'bad arguments' or 'no such function'.

Now all non-trivial vshard.router functions are disabled until vshard.router.cfg (or vshard.router.new) is finished and error is raised in case of an attempt to access them.

Manual API's enabling/disabling is also introduced in this patch. The behavior of router's protection is similar to the storage's one.

Closes #291

Gerold103 commented 2 years ago

Looks like your commit also closes #194 - lets add Closes for it to the commit message.