Skip to content

Expose current identification_mode #460

@DifferentialOrange

Description

@DifferentialOrange

#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.

  1. Do not use keys at all, iterate through map and compare instance/replicaset .uuid/.name fields to search.
  2. Try to guess current mode by substituting both instance/replicaset uuid and name.
  3. 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions