https://github.com/tarantool/vshard/issues/426 had introduced two vshard.storage.info() modes: with names as map keys and with uuids as map keys. There are some cases when .info() is processed automatically (for example, in tarantool/crud). To support new info layout in these cases, we need to know current identification_mode. And now there is no public API to discover it.
Several workarounds are available.
Do not use keys at all, iterate through map and compare instance/replicaset .uuid/.name fields to search.
Try to guess current mode by substituting both instance/replicaset uuid and name.
Use private vshard.storage.internal.current_cfg variable to extract current configuration.
The first one is both non-optimal and inconvenient, the second uses some questionable assumptions (for example, what we should do if we had found both?), the third one may easily break since it is non-public API.
https://github.com/tarantool/vshard/issues/426 had introduced two
vshard.storage.info()
modes: with names as map keys and with uuids as map keys. There are some cases when.info()
is processed automatically (for example, in tarantool/crud). To support new info layout in these cases, we need to know currentidentification_mode
. And now there is no public API to discover it.Several workarounds are available.
.uuid
/.name
fields to search.vshard.storage.internal.current_cfg
variable to extract current configuration.The first one is both non-optimal and inconvenient, the second uses some questionable assumptions (for example, what we should do if we had found both?), the third one may easily break since it is non-public API.