-
Notifications
You must 8000 be signed in to change notification settings - Fork 387
connpool: support filtering by sharding.roles
#10318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Jul 29, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` options. @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`, `rebalancer`. Closes tarantool#10318 Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Jul 29, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`, `rebalancer`. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Jul 29, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`, `rebalancer`. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Jul 29, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`, `rebalancer`. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 1, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`, `rebalancer`. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 1, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`, `rebalancer`. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 5, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`, `rebalancer`. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 5, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` and `connpool.call()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` and `connpool.call()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`. Filtering out the `rebalancer` instances are not supported. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) -- Would call the function 'f1' on 'instance-001' or 'instance-002' connpool.call('f1', nil, { sharding_roles = { 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 5, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` and `connpool.call()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` and `connpool.call()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`. Filtering out the `rebalancer` instances are not supported. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) -- Would call the function 'f1' on 'instance-001' or 'instance-002' connpool.call('f1', nil, { sharding_roles = { 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 9, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` and `connpool.call()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` and `connpool.call()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`. Filtering out the `rebalancer` instances are not supported. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) -- Would call the function 'f1' on 'instance-001' or 'instance-002' connpool.call('f1', nil, { sharding_roles = { 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 9, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` and `connpool.call()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` and `connpool.call()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`. Filtering out the `rebalancer` instances are not supported. Example: ```yaml sharding: roles: [storage, router] groups: group-001: replicasets: replicaset-001: sharding: roles: [storage, router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-001', 'instance-002', 'instance-003', -- 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'storage', 'router' }}) -- Would call the function 'f1' on 'instance-001' or 'instance-002' connpool.call('f1', nil, { sharding_roles = { 'router' }}) ```
georgiy-belyanin
added a commit
to georgiy-belyanin/tarantool
that referenced
this issue
Aug 15, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` and `connpool.call()` options. Closes tarantool#10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` and `connpool.call()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`. Filtering out the `rebalancer` instances are not supported. Example: ```yaml groups: group-001: replicasets: replicaset-001: sharding: roles: [router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-003', 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'router' }}) -- Would call the function 'f1' on 'instance-001' or 'instance-002' connpool.call('f1', nil, { sharding_roles = { 'router' }}) ```
Totktonada
pushed a commit
that referenced
this issue
Aug 15, 2024
Support filtering replicasets by the configured sharding role by adding `sharding_roles` into the `connpool.filter()` and `connpool.call()` options. Closes #10318 @TarantoolBot document connpool: `sharding.roles` filtering support Now `connpool.filter()` and `connpool.call()` supports filtering by sharding roles using the `sharding_roles` option. Its value is the table containing the required sharding roles. Possible roles are: `router`, `storage`. Filtering out the `rebalancer` instances are not supported. Example: ```yaml groups: group-001: replicasets: replicaset-001: sharding: roles: [router] instances: instance-001: {} instance-002: {} group-002: replicasets: replicaset-002: sharding: roles: [storage] instances: instance-003: {} instance-004: {} ``` ```lua -- Returns { 'instance-003', 'instance-004' } connpool.filter({ sharding_roles = { 'storage' }}) -- Returns { 'instance-001', 'instance-002' } connpool.filter({ sharding_roles = { 'router' }}) -- Would call the function 'f1' on 'instance-001' or 'instance-002' connpool.call('f1', nil, { sharding_roles = { 'router' }}) ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes it's convenient to have a way to filter out all router or storage replicasets in connpool. The role of the replicaset is specified by the
sharding.role
option, which is not supported inconnpool
.Need to support filtering by a
sharding_roles
option inconnpool.filter()
.The text was updated successfully, but these errors were encountered: