-
Notifications
You must be signed in to change notification settings - Fork 35
Description
When a storage is disabled, any call to vshard.storage.info() currently returns a storage disabled error.
Disabling a replica for reads/writes is a normal operational scenario—for example, Cartridge disables a storage on OperationError or before the very first apply_config() at instance start, while the roles' logic is still inactive. At the same time, modules such as crud still need to read the vshard configuration in the disabled state but cannot because storage.info() is blocked.
Moreover, to determine whether a storage is enabled, a user has to use vshard.storage.internal.is_enabled or catch the error, which is inconvenient.
Proposal:
-
Let vshard.storage.info() work even when the storage is disabled.
-
Include a status = 'disabled' | 'enabled' field in the returned table (or provide a public helper such as vshard.storage.is_enabled()) so applications can detect the state without relying on internals.