Skip to content

crud: store the cursor's after_tuple explicitly as a Lua table #387

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

Conversation

CuriousGeorgiy
Copy link
Member

In scope of tarantool/tarantool#8147, a new context-dependent extension for box tuples, MP_TUPLE, is introduced. If the merger's buffer source is used, raw MsgPack is received, which does not allow for passing the context required for decoding MP_TUPLE.

At the same time, all box tuples are now encoded as MP_TUPLE by default. If the merger's tuple chunk can be decoded by manually skipping the extension header of MP_TUPLE and the tuple format of individual tuples, the cursor is decoded using the Lua msgpack library, which cannot handle MP_TUPLEs without a decoding context.

The cursor's after_tuple field is a box tuple, so in order to overcome the limitation above, we need to explicitly convert it to a Lua table.

I didn't forget about

  • Tests
  • Changelog
  • Documentation

Needed for tarantool/tarantool#8147

In scope of tarantool/tarantool#8147, a new context-dependent extension for
box tuples, `MP_TUPLE`, is introduced. If the merger's buffer source is
used, raw MsgPack is received, which does not allow for passing the context
required for decoding `MP_TUPLE`.

At the same time, all box tuples are now encoded as `MP_TUPLE` by default.
If the merger's tuple chunk can be decoded by manually skipping the
extension header of `MP_TUPLE` and the tuple format of individual tuples,
the cursor is decoded using the Lua `msgpack` library, which cannot handle
`MP_TUPLE`s without a decoding context.

The cursor's `after_tuple` field is a box tuple, so in order to overcome
the limitation above, we need to explicitly convert it to a Lua table.

Needed for tarantool/tarantool#8147
Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections from my side.

@Totktonada Totktonada removed their assignment Oct 16, 2023
@DifferentialOrange DifferentialOrange merged commit d18ad41 into tarantool:master Oct 16, 2023
DifferentialOrange added a commit that referenced this pull request Oct 16, 2023
Overview

  This release improves experience for VShard clusters users and
  Tarantool 3 users. It also introduces schema introspection API.

New features

  * Space schema introspection API `crud.schema` (#380).

Bugfixes

  * Return explicit error for `*_many` call with
    no tuples/objects (#377).
  * `crud.readview` resource cleanup on garbage collect (#379).
  * VShard storage user have not execution rights for
    internal functions (#366).
  * Compatibility with Tarantool 3.0 tuple objects (#387).

Infrastructure

  * `deps.sh` installs the `vshard` instead of the `cartridge`
    by default (#364). You could to specify an environment variable
    `CARTIRDGE_VERSION` to install the `cartridge` and run tests cases
    with it.
  * `doc/playground.lua` does not work with Tarantool 3 (#371).
  * Tests with Tarantool 3 (#364).
  * Quickstart section in the README.md focuses on usage with `vshard`
    instead of `Cartridge` (#366).
@DifferentialOrange DifferentialOrange mentioned this pull request Oct 16, 2023
DifferentialOrange added a commit that referenced this pull request Oct 16, 2023
Overview

  This release improves experience for VShard clusters users and
  Tarantool 3 users. It also introduces schema introspection API.

New features

  * Space schema introspection API `crud.schema` (#380).

Bugfixes

  * Return explicit error for `*_many` call with
    no tuples/objects (#377).
  * `crud.readview` resource cleanup on garbage collect (#379).
  * VShard storage user have not execution rights for
    internal functions (#366).
  * Compatibility with Tarantool 3.0 tuple objects (#387).

Infrastructure

  * `deps.sh` installs the `vshard` instead of the `cartridge`
    by default (#364). You could to specify an environment variable
    `CARTIRDGE_VERSION` to install the `cartridge` and run tests cases
    with it.
  * `doc/playground.lua` does not work with Tarantool 3 (#371).
  * Tests with Tarantool 3 (#364).
  * Quickstart section in the README.md focuses on usage with `vshard`
    instead of `Cartridge` (#366).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants