Skip to content
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

Disallow using space_id #255

Closed
DifferentialOrange opened this issue Jan 13, 2022 · 0 comments · Fixed by #338
Closed

Disallow using space_id #255

DifferentialOrange opened this issue Jan 13, 2022 · 0 comments · Fixed by #338
Assignees
Labels
bug Something isn't working

Comments

@DifferentialOrange
Copy link
Member

crud.len allows to using space_id instead of space_name:

crud/crud/len.lua

Lines 39 to 40 in 76e3374

function len.call(space_name, opts)
checks('string|number', {

AFAIK, every other crud method do not support it, so there is an inconsistency. There are two possible ways, and it seems like it is better to prohibit using space_id since in sharded system its consistency is not guaranteed: see @olegrok #244 (comment)

@DifferentialOrange DifferentialOrange added invalid This doesn't seem right needs feedback Something is unclear with the issue question Further information is requested teamE bug Something isn't working and removed invalid This doesn't seem right needs feedback Something is unclear with the issue labels Jan 13, 2022
DifferentialOrange added a commit that referenced this issue Jan 28, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Jan 31, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Jan 31, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 4, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 4, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 17, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 18, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 18, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 18, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 18, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 18, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 18, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 21, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 21, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 21, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 22, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 22, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 22, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 24, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 24, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 24, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Feb 25, 2022
`crud.len` supports using space id instead of name. After this patch,
stats wrapper support mapping id to name.

Since using space id is a questionable pattern (see #255), this commit
may be reverted later.

Part of #224
DifferentialOrange added a commit that referenced this issue Aug 26, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Aug 26, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Aug 26, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Aug 26, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Aug 29, 2022
DifferentialOrange added a commit that referenced this issue Aug 29, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Aug 29, 2022
DifferentialOrange added a commit that referenced this issue Aug 29, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Aug 29, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Aug 31, 2022
DifferentialOrange added a commit that referenced this issue Aug 31, 2022
CRUD stats are separated by space name. If space id is passed instead of
name (only `crud.len` allows this), space name is resolved with net_box
schema. Since, after resolving #44, non-default vshard routers and
Cartridge vshard groups are supported, to resolve the name we must know
what vshard router should be used. Since using space id for `crud.len`
is deprecated now, we won't support name resolve for operations with
custom router statistics. Instead of this, a warning will be logged.
`crud.len` statistics will be signed by space name or space id casted to
string depending on is there a default router with space schema or not.

Follows up #44, part of #255
DifferentialOrange added a commit that referenced this issue Sep 13, 2022
Overview

  This release introduces vshard group and non-default vshard routers
  support.

  To use a space Cartridge vshard group, pass group name to a request
  a `vshard_group` request option.

  ```lua
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = 'hot'})
  ```

  To use non-default vshard router, pass router object to a request.

  ```lua
  local vshard_router = vshard.router.new(name, cfg)
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = vshard_router})
  ```

New features

  * vshard group and non-default vshard routers support (#44).

Changes

  * Deprecate using space id in crud.len (#255).
DifferentialOrange added a commit that referenced this issue Sep 13, 2022
Overview

  This release introduces vshard group and non-default vshard routers
  support.

  To use a space Cartridge vshard group, pass group name to a request
  `vshard_group` option.

  ```lua
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = 'hot'})
  ```

  To use non-default vshard router, pass router object to a request.

  ```lua
  local vshard_router = vshard.router.new(name, cfg)
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = vshard_router})
  ```

New features

  * vshard group and non-default vshard routers support (#44).

Changes

  * Deprecate using space id in crud.len (#255).
DifferentialOrange added a commit that referenced this issue Sep 14, 2022
Overview

  This release introduces vshard group and non-default vshard routers
  support.

  To use a space Cartridge vshard group, pass group name to a request
  `vshard_group` option.

  ```lua
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = 'hot'})
  ```

  To use non-default vshard router, pass router object to a request
  `vshard_group` option.

  ```lua
  local my_router = vshard.router.new(name, cfg)
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = my_router})
  ```

New features

  * vshard group and non-default vshard routers support (#44).

Changes

  * Deprecate using space id in crud.len (#255).
DifferentialOrange added a commit that referenced this issue Sep 14, 2022
Overview

  This release introduces vshard group and non-default vshard routers
  support.

  To use a space Cartridge vshard group, pass group name to a request
  `vshard_group` option.

  ```lua
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = 'hot'})
  ```

  To use non-default vshard router, pass router object to a request
  `vshard_group` option.

  ```lua
  local my_router = vshard.router.new(name, cfg)
  local res, err = crud.select('customers',
                               {{'<=', 'age', 35}},
                               {first = 10, vshard_group = my_router})
  ```

New features

  * vshard group and non-default vshard routers support (#44).

Changes

  * Deprecate using space id in crud.len (#255).
@DifferentialOrange DifferentialOrange self-assigned this Jan 27, 2023
DifferentialOrange added a commit that referenced this issue Jan 27, 2023
Using space id instead of a space name in sharded systems may be
dangerous until one sets all space id manually. This is a breaking
change. The feature was deprecated since 0.14.0.

Closes #255
DifferentialOrange added a commit that referenced this issue Jan 27, 2023
Using space id instead of a space name in sharded systems may be
dangerous until one sets all space id manually. This is a breaking
change. The feature was deprecated since 0.14.0.

Closes #255
DifferentialOrange added a commit that referenced this issue Jan 27, 2023
Using space id instead of a space name in sharded systems may be
dangerous until one sets all space id manually. This is a breaking
change. The feature was deprecated since 0.14.0.

Closes #255
DifferentialOrange added a commit that referenced this issue Jan 27, 2023
Using space id instead of a space name in sharded systems may be
dangerous until one sets all space id manually. This is a breaking
change. The feature was deprecated since 0.14.0.

Closes #255
DifferentialOrange added a commit that referenced this issue Jan 30, 2023
Using space id instead of a space name in sharded systems may be
dangerous until one sets all space id manually. This is a breaking
change. The feature was deprecated since 0.14.0.

Closes #255
DifferentialOrange added a commit that referenced this issue Feb 2, 2023
Overview

  This release introduces a breaking change with removing a deprecated
  feature: `crud.len(space_id)`.

  This release also introduces a Cartridge clusterwide config to setup
  `crud.cfg`.

Breaking changes

  You cannot use space id as a space identifier in `crud.len` anymore.
  Use space name instead.

New features

  * Timeout condition for the validation of master presence in 
    replicaset and for the master connection (#95).
  * Cartridge clusterwide configuration for `crud.cfg` (#332).

Changes

  * Forbid using space id in `crud.len` (#255).

Fixes

  * Add validation of the master presence in replicaset and the 
    master connection to the `utils.get_space` method before 
    receiving the space from the connection (#331).
  * Fix fiber cancel on schema reload timeout in `call_reload_schema`
    (PR #337).
@DifferentialOrange DifferentialOrange mentioned this issue Feb 2, 2023
1 task
DifferentialOrange added a commit that referenced this issue Feb 2, 2023
Overview

  This release introduces a breaking change with removing a deprecated
  feature: `crud.len(space_id)`.

  This release also introduces a Cartridge clusterwide config to setup
  `crud.cfg`.

Breaking changes

  You cannot use space id as a space identifier in `crud.len` anymore.
  Use space name instead.

New features

  * Timeout condition for the validation of master presence in 
    replicaset and for the master connection (#95).
  * Cartridge clusterwide configuration for `crud.cfg` (#332).

Changes

  * Forbid using space id in `crud.len` (#255).

Fixes

  * Add validation of the master presence in replicaset and the 
    master connection to the `utils.get_space` method before 
    receiving the space from the connection (#331).
  * Fix fiber cancel on schema reload timeout in `call_reload_schema`
    (PR #336).
DifferentialOrange added a commit that referenced this issue Feb 2, 2023
Overview

  This release introduces a breaking change with removing a deprecated
  feature: `crud.len(space_id)`.

  This release also introduces a Cartridge clusterwide config to setup
  `crud.cfg`.

Breaking changes

  You cannot use space id as a space identifier in `crud.len` anymore.
  Use space name instead.

New features

  * Timeout condition for the validation of master presence in 
    replicaset and for the master connection (#95).
  * Cartridge clusterwide configuration for `crud.cfg` (#332).

Changes

  * Forbid using space id in `crud.len` (#255).

Fixes

  * Add validation of the master presence in replicaset and the 
    master connection to the `utils.get_space` method before 
    receiving the space from the connection (#331).
  * Fix fiber cancel on schema reload timeout in `call_reload_schema`
    (PR #336).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants