tarantool / tarantool/doc

Document that DDL is disabled with an old system schema

Open
#3,484 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.0 feature server upgrade
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Related dev. issue(s): https://github.com/tarantool/tarantool/issues/7149

Product: Tarantool
Since: 3.0
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/upgrade/
SME: @ locker

Details

Executing DDL operations with an old (not upgraded) system schema is
dangerous and might result in unexpected breakages. So we decided to
explicitly forbid all DDL operations with an old system schema until
box.schema.upgrade() is called. Note, one can still call box.schema
functions with an old schema provided they do nothing, for example, if
an object is created with the if_not_exists flag and the object with
same id already exists:

box.schema.create_space('test', {if_not_exists = true})

Otherwise an attempt to create a space with an old schema will raise
an error like shown below:

tarantool> box.schema.space.create('test')
---
- error: Your schema version is 1.6.8 while Tarantool
    3.0.0-entrypoint-262-g3eaba1cef686 requires a more recent
    schema version. Please, consider using box.schema.upgrade().
...

Requested by @ locker in https://github.com/tarantool/tarantool/commit/97c2c9a4fb58b058e7dedd420fce11a6f1ade21f.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the root document at reference/reference_lua/box_schema/upgrade/ and review its existing upgrade guidance. Document that DDL is disabled until box.schema.upgrade() is called, including the if_not_exists exception and the shown error example. Done means the restriction and upgrade prerequisite are clear to users of Tarantool 3.0 and later.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.