Commit Briefs

45a340ab5e Igor Munkin

luajit: bump new version (ligurio/lj-549-fix-bytecode-loader)

* Followup fix for embedded bytecode loader. * Fix embedded bytecode loader. Part of #9145 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump


d75cd4239f Yaroslav Lobankov

test: bump test-run to new version

Bump test-run to new version with the following improvements: - Bump luatest to 1.0.0-5-gf31fe34 [1] - get_iproto_port: remove duplicates [2] - requirements: bump gevent to 22.10.2 [3] - Fix decoding error when reading server's log file [4] [1] tarantool/test-run@bfcc9e8 [2] tarantool/test-run@da98d7f [3] tarantool/test-run@bc1c473 [4] tarantool/test-run@434cbec NO_DOC=test NO_TEST=test NO_CHANGELOG=test


1247ec5fb5 Serge Petrenko

box/lua: switch box.iproto.override() to event triggers

Switch the legacy `box.iproto.override()' interface to the newly introduced event triggers. This change is mostly not user-visible, except: - Now it can be called before `box.cfg{}'; - Now request type can be set as a string; - Some changes in error messages; - The "overriding does not support ... request type" error is logged, rather than raised; - The internal trigger is visible via the `trigger' module. If some request type is overridden by both interfaces (legacy `box.iproto.override()' and new `trigger.set()'), the order of invocation of the handlers is unspecified. Closes #8138 NO_DOC=internal


6fed99bc85 Serge Petrenko

iproto: override request handlers using event triggers (part 2)

This patch allows to override IPROTO request handlers by setting triggers on the corresponding events after the initial `box.cfg{}' call. Part of #8138 @TarantoolBot document Title: Document iproto override using event triggers Product: Tarantool Since: 3.1 Root document: New page - https://www.tarantool.io/en/doc/latest/reference/reference_lua/trigger/ Since Tarantool 3.1 there are 2 ways to override iproto request handlers: 1. Using `box.iproto.override()`, introduced in Tarantool 2.11: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_iproto/override/ 2. Using universal trigger registry: tarantool/doc#3988 To override an iproto request handler for the given request type, one can set a trigger (or multiple triggers) on the corresponding event. There are 2 types of iproto-overriding events: 1. set by request type id, e.g.: - box.iproto.override[1] - box.iproto.override[-1] 2. set by request type name (the name must be in the lowercase), e.g.: - box.iproto.override.select - box.iproto.override.unknown Override-by-id allows to set a handler for a particular request type, that is not known by the given version of Tarantool. This is not possible with override-by-name, where a type name must be known by Tarantool. Also there are a special type name "unknown" and a type id box.iproto.type.UNKNOWN (== -1) that allow to set a single handler for all unknown request types. Multiple triggers can be associated with a single event. The triggers are called in reverse order of their installation, however triggers set by id are called before triggers set by name. If a trigger returns `false`, the next trigger in the list is called, or a system handler if there are no more triggers. If a trigger returns `true`, no more triggers or system handlers are called. If some request type is overridden by both interfaces (legacy `box.iproto.override()' and new `trigger.set()'), the order of invocation of those handlers is unspecified. Co-authored-by: Andrey Saranchin <Andrey22102001@gmail.com>


98c91930fd Serge Petrenko

iproto: override request handlers using event triggers (part 1)

This patch allows to override IPROTO request handlers by setting triggers on the corresponding events before the initial `box.cfg{}' call. For triggers that are set after the first `box.cfg{}', see next commit. There are 2 types of iproto-overriding events: 1. set by request type id, e.g.: - box.iproto.override[1] - box.iproto.override[-1] 2. set by request type name (the name must be in the lowercase), e.g.: - box.iproto.override.select - box.iproto.override.unknown Override-by-id allows to set a handler for a particular request type, that is not known by the given version of Tarantool. This is not possible with override-by-name, where a type name must be known by Tarantool. Also there are a special type name "unknown" and a type id box.iproto.type.UNKNOWN (== -1) that allow to set a single handler for all unknown request types. Multiple triggers can be associated with a single event. The triggers are called in reverse order of their installation, however triggers set by id are called before triggers set by name. If a trigger returns `false`, the next trigger in the list is called, or a system handler if there are no more triggers. If a trigger returns `true`, no more triggers or system handlers are called. Part of #8138 NO_DOC=see next commit NO_CHANGELOG=see next commit Co-authored-by: Andrey Saranchin <Andrey22102001@gmail.com>


2515ab166e Serge Petrenko

iproto: refactor `iproto_req_handler` structure

So far only one type of a handler can be set for a particular request type, but the following commit will bring two more handlers. This patch prepares `struct iproto_req_handler` for this extension to simplify next commits. Part of #8138 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring


6dddc1767d Serge Petrenko

core/lua: support msgpack translation in space recovery triggers

This patch adds `iproto_key_translation' to the MsgPack decoding context, that is used to decode xrow header and body in the space recovery triggers. NO_DOC=Minor improvement NO_CHANGELOG=Minor improvement


27d265fc9f Serge Petrenko

core/lua: introduce func_adapter_push_msgpack_with_ctx

It works like func_adapter_push_msgpack, but with an additional MsgPack decoding context. The context is required to support translation of first-level `MP_MAP` keys. Needed for #8138 NO_DOC=internal NO_CHANGELOG=internal


e99c204979 Serge Petrenko

core: introduce event_on_change function

Since we are going to move iproto override mechanism to the trigger registry, we need to allow to set core triggers to on change event because we need to notify iproto threads when a handler is overridden. Let's add a new method that accepts a core trigger and sets it to an internal trigger list. Needed for #8138 NO_DOC=internal NO_CHANGELOG=internal


a1aa38fda4 Serge Petrenko

test: fix test case name duplication in iproto override test

Test box-luatest/iproto_request_handlers_overriding_test.lua has two test cases with the same name. That is why a test case that was declared first is replaced by the second one and that's why it is not launched. The commit renames one of the cases. NO_CHANGELOG=test NO_DOC=test


Branches



























































































Tags

Tree

.editorconfigcommits | blame
.gdbinitcommits | blame
.gitattributescommits | blame
.github/
.gitignorecommits | blame
.gitmodulescommits | blame
.luacheckrccommits | blame
.pack.mkcommits | blame
.test.mkcommits | blame
AUTHORScommits | blame
CMakeLists.txtcommits | blame
CONTRIBUTING.mdcommits | blame
Doxyfilecommits | blame
Doxyfile.API.incommits | blame
FreeBSD/
LICENSEcommits | blame
README.FreeBSDcommits | blame
README.MacOSXcommits | blame
README.OpenBSDcommits | blame
README.mdcommits | blame
TODOcommits | blame
apk/
asan/
changelogs/
cmake/
debian/
doc/
extra/
patches/
perf/
rpm/
rump/
src/
static-build/
test/
test-run$commits | blame
third_party/
tools/

README.md

# Tarantool

[![Actions Status][actions-badge]][actions-url]
[![Code Coverage][coverage-badge]][coverage-url]
[![OSS Fuzz][oss-fuzz-badge]][oss-fuzz-url]
[![Telegram][telegram-badge]][telegram-url]
[![GitHub Discussions][discussions-badge]][discussions-url]
[![Stack Overflow][stackoverflow-badge]][stackoverflow-url]

[Tarantool][tarantool-url] is an in-memory computing platform consisting of a
database and an application server.

It is distributed under [BSD 2-Clause][license] terms.

Key features of the application server:

* Heavily optimized Lua interpreter with incredibly fast tracing JIT compiler,
  based on LuaJIT 2.1.
* Cooperative multitasking, non-blocking IO.
* [Persistent queues][queue].
* [Sharding][vshard].
* [Cluster and application management framework][cartridge].
* Access to external databases such as [MySQL][mysql] and [PostgreSQL][pg].
* A rich set of built-in and standalone [modules][modules].

Key features of the database:

* MessagePack data format and MessagePack based client-server protocol.
* Two data engines: 100% in-memory with complete WAL-based persistence and an
  own implementation of LSM-tree, to use with large data sets.
* Multiple index types: HASH, TREE, RTREE, BITSET.
* Document oriented JSON path indexes.
* Asynchronous master-master replication.
* Synchronous quorum-based replication.
* RAFT-based automatic leader election for the single-leader configuration.
* Authentication and access control.
* ANSI SQL, including views, joins, referential and check constraints.
* [Connectors][connectors] for many programming languages.
* The database is a C extension of the application server and can be turned
  off.

Supported platforms are Linux (x86_64, aarch64), Mac OS X (x86_64, M1), FreeBSD
(x86_64).

Tarantool is ideal for data-enriched components of scalable Web architecture:
queue servers, caches, stateful Web applications.

To download and install Tarantool as a binary package for your OS or using
Docker, please see the [download instructions][download].

To build Tarantool from source, see detailed [instructions][building] in the
Tarantool documentation.

To find modules, connectors and tools for Tarantool, check out our [Awesome
Tarantool][awesome-list] list.

Please report bugs to our [issue tracker][issue-tracker]. We also warmly
welcome your feedback on the [discussions][discussions-url] page and questions
on [Stack Overflow][stackoverflow-url].

We accept contributions via pull requests. Check out our [contributing
guide][contributing].

Thank you for your interest in Tarantool!

[actions-badge]: https://github.com/tarantool/tarantool/workflows/release/badge.svg
[actions-url]: https://github.com/tarantool/tarantool/actions
[coverage-badge]: https://coveralls.io/repos/github/tarantool/tarantool/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/tarantool/tarantool?branch=master
[telegram-badge]: https://img.shields.io/badge/Telegram-join%20chat-blue.svg
[telegram-url]: http://telegram.me/tarantool
[discussions-badge]: https://img.shields.io/github/discussions/tarantool/tarantool
[discussions-url]: https://github.com/tarantool/tarantool/discussions
[stackoverflow-badge]: https://img.shields.io/badge/stackoverflow-tarantool-orange.svg
[stackoverflow-url]: https://stackoverflow.com/questions/tagged/tarantool
[oss-fuzz-badge]: https://oss-fuzz-build-logs.storage.googleapis.com/badges/tarantool.svg
[oss-fuzz-url]: https://oss-fuzz.com/coverage-report/job/libfuzzer_asan_tarantool/latest
[tarantool-url]: https://www.tarantool.io/en/
[license]: LICENSE
[modules]: https://www.tarantool.io/en/download/rocks
[queue]: https://github.com/tarantool/queue
[vshard]: https://github.com/tarantool/vshard
[cartridge]: https://github.com/tarantool/cartridge
[mysql]: https://github.com/tarantool/mysql
[pg]: https://github.com/tarantool/pg
[connectors]: https://www.tarantool.io/en/download/connectors
[download]: https://www.tarantool.io/en/download/
[building]: https://www.tarantool.io/en/doc/latest/dev_guide/building_from_source/
[issue-tracker]: https://github.com/tarantool/tarantool/issues
[contributing]: CONTRIBUTING.md
[awesome-list]: https://github.com/tarantool/awesome-tarantool/