Commit Briefs

5baf0756b0 Sergey Bronnikov

luajit: bump new version (ligurio/lj-881-fix-concat)

* LJ_GC64: Fix lua_concat(). Part of #8825 NO_DOC=LuaJIT submodule bump NO_TEST=LuaJIT submodule bump


2c422a0b98 Serge Petrenko

test: fixup the 1mops perf test

The option --sync was ignored due to a misprint. The temporary dir was never removed, overflowing the /tmp by default. NO_TEST=test update NO_DOC=test update NO_CHANGELOG=test update


e99f6cb094 Igor Munkin

test: remove finalizers table overflow test

This test is no longer needed in the Tarantool test suite since it was added to LuaJIT's test suite along with the fix for the issue mentioned in #3060 in scope of #8825 in commit tarantool/luajit@7b98314e0dacc7313c061aceeb0a32afd4e8cbce. Closes #3060 Related to #8825 NO_DOC=Cleanup NO_TEST=Already included in LuaJIT bump NO_CHANGELOG=Already included in LuaJIT bump


4b88d5fd98 Vladimir Davydov

box: allow lua_call priv owners to call registered Lua functions

Currently, the lua_call privilege simply doesn't work for registered functions. This patch fixes this issue: now, it grants access to any registered function that is written in Lua unless it's a built-in function, such as dostring, or a persistent function. Note, this patch renames access_check_call to access_check_lua_call to avoid confusion because this function is now global. It also renames access_check_eval to access_check_lua_eval for consistency. Closes #9363 NO_DOC=updated doc ticket manually NO_CHANGELOG=feature has not been released yet


44401529a2 Vladimir Davydov

fiber: make the concurrent fiber_join safer

Prior to this patch a bunch of illegal conditions was possible: 1. The joinability of a fiber could be changed while the fiber is being joined by someone. This could lead to double recycling: the first one happened on the fiber finish, and the second one in the fiber join. 2. The joinability of a dead joinable fiber could be altered, this led to inability jo join the dead fiber and free its resources. 3. A running fiber could be joined concurrently by two or more fibers, so the fiber could be recycled more than once (once per each concurrent join). 4. A dead recycled fiber could be made joinable and joined leading to the double recycle. Fixed these issues by adding a new FIBER_JOIN_BEEN_INVOKED flag: now the `fiber_set_joinable` and `fiber_join_timeout` functions detect the double join. Because of the API limitations both of them panic when an invalid condition is met: - The `fiber_set_joinable` was not designed to report errors. - The `fiber_join_timeout` can't raise any error unless a timeout is met, because the `fiber_join` users don't expect to receive any error from this function at all (except the one generated by the joined fiber). It's still possible that a fiber join is performed on a struct which has been recycled and, if the new fiber is joinable too, this can't be detected. The current fiber API does not allow to fix this, so this is to be the user's responsibility, they should be warned about the fact the double join to the same fiber is illegal. Closes #7562 @TarantoolBot document Title: `fiber_join`, `fiber_join_timeout` and `fiber_set_joinable` behave differently now. `fiber_join` and `fiber_join_timeout` now panic in case if double join of the given fiber is detected. `fiber_set_joinable` now panics if the given fiber is dead or is joined already. This prevents some amount of error conditions that could happen when using the API in an unexpected way, including: - Making a dead joinable fiber non-joinable could lead to a memory leak: one can't join the fiber anymore. - Making a dead joinable fiber joinable again is a sign of attempt to join the fiber later. That means the fiber struct may be joined later, when it's been recycled and reused. This could lead to a very hard to debug double join. - Making an alive joined fiber non-joinable would lead to the double free: once on the fiber function finish, and secondly in the active fiber join finish. Risks of making it joinable are described above. - Making a dead and recycled fiber joinable allowed to join the fiber once again leading to a double free. Any given by the API `struct fiber` should only be joined once. If a fiber is joined after the first join on it has finished the behavior is undefined: it can either be a panic or an incidental join to a totally foreign fiber.


8ab8d656c0 Vladimir Davydov

box: add check against setting box.cfg options to inf and nan

Setting a box.cfg option to inf or nan can result in a crash or invalid behavior. For example, setting `box.cfg.checkpoint_interval` to 0/0 triggers an assertion failure. Let's add a check against inf and nan for all options. These special numbers don't make any sense as configuration option values anyway. Closes #4962 NO_DOC=bug fix


8410e68e87 Igor Munkin

sql: remove field stat from struct index_opts

Since our SQL statistics are disabled, this field is no longer required. Closes #9343 NO_DOC=refactoring NO_TEST=refactroring NO_CHANGELOG=refactoring


67c3033415 Igor Munkin

sql: remove use of index->opts.stat

There is only one place where the field is filled with other then 0. Still, there is only two possible options, one of them is 0, the other is default value. Let's use them without filling the field. NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring


6d99efe685 Vladimir Davydov

cmake: include config-specific and LTO flags into TARANTOOL_C_FLAGS

Prior to this patch only the flags given by the CMAKE_C_FLAGS were shown in the tarantool -v and Lua's tarantool.build.flags. Make it also show the flags from CMAKE_C_FLAGS_<CONFIG> and CFLAGS_LTO variables. The first one is config-specific set of flags (different for Debug, Release, RelWithDebInfo and MinSizeRel configs), the former is set in the cmake/lto.cmake if LTO is enabled. Closes #8022 NO_DOC=build


e529103814 Vladimir Davydov

box: decrement BOX_SPACE_MAX

Currently, BOX_SPACE_MAX equals BOX_ID_NIL, which is used as an error indicator in the box C API. As a result, if box_space_id_by_name() returns BOX_ID_NIL, it's impossible to figure out whether there's no space with the give name or the space exists and has the id equal to BOX_SPACE_MAX. Let's decrement BOX_SPACE_MAX to fix this issue. Since this may break recovery, let's also introduce the new compatibility module option `box_space_max` to allow the user revert to the old behavior. Closes #9118 @TarantoolBot document Title: Document `compat.box_space_max` Please create an entry for the new compatibility module option at https://tarantool.io/compat/box_space_max. `compat.box_space_max` sets the max space id (`box.schema.SPACE_MAX`). The old limit is 2147483647. The new limit is 2147483646. The limit was decremented because the old value is used as an error indicator in the box C API (it equals `BOX_ID_NIL`).


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/