Commit Briefs

d6dbaa34ff Sergey Bronnikov

cmake: fixup (ligurio/fix-resource-temporarily-unavailable)

NO_CHANGELOG=internal NO_DOC=internal NO_TEST=internal


e00992c0a3 Sergey Bronnikov

cmake: fix building on Mac M1

"Resource temporarily unavailable" NO_CHANGELOG=internal NO_DOC=internal NO_TEST=internal


9da70207aa Aleksandr Lyapunov

tuple: refactor flags

Before this patch struct tuple had two boolean bit fields: is_dirty and has_uploaded_refs. It is worth mentioning that sizeof(boolean) is implementation depended. However, in code it is assumed to be 1 byte (there's static assertion restricting the whole struct tuple size by 10 bytes). So strictly speaking it may lead to the compilation error on some non-conventional system. Secondly, bit fields anyway consume at least one size of type (i.e. there's no space benefits in using two uint8_t bit fields - they anyway occupy 1 byte in total). There are several known pitfalls concerning bit fields: - Bit field's memory layout is implementation dependent; - sizeof() can't be applied to such members; - Complier may raise unexpected side effects (https://lwn.net/Articles/478657/). Finally, in our code base as a rule we use explicit masks: txn flags, vy stmt flags, sql flags, fiber flags. So, let's replace bit fields in struct tuple with single member called `flags` and several enum values corresponding to masks (to be more precise - bit positions in tuple flags). NO_DOC=<Refactoring> NO_CHANGELOG=<Refactoring> NO_TEST=<Refactoring>


ba140128df Kirill Yukhin

datetime: fix set with hour=nil

We did not retain correctly `hour` attribute if modified via `:set` method attributes `min`, `sec` or `nsec`. ``` tarantool> a = dt.parse '2022-05-05T00:00:00' tarantool> a:set{min = 0, sec = 0, nsec = 0} -- - 2022-05-05T12:00:00Z ... ``` Closes #7298 NO_DOC=bugfix


e797a7483c Vladimir Davydov

vinyl: rotate active memory index in vy_squash_process if necessary

If vy_point_lookup called by vy_sauash_process yields (doing disk read), a dump may be triggered bumping the L0 generation counter, in which case we would insert a statement to a sealed vy_mem, as explained in #5080. Let's check the generation counter and rotate the active vy_mem if necessary after vy_point_lookup to avoid that. Closes #5080 NO_DOC=bug fix NO_TEST=complicated, need stress/perf test to catch bugs like this


415d8b259a Vladimir Davydov

vinyl: add vy_lsm_rotate_mem_if_required helper

We often call vy_lsm_rotate_mem_if_required if its generation or schema version is older than the current one. Let's add a helper function for that. Needed for #5080 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring


afce091323 Vladimir Davydov

vinyl: drop UPSERT squashing optimization when there is no disk data

The optimization is mostly useless, because it only works if there's no data on disk. As explained in #5080, it contains a potential bug: if L0 dump is triggered between 'prepare' and 'commit', it will insert a statement to a sealed vy_mem. Let's drop it. Part of #5080 NO_DOC=bug fix NO_CHANGELOG=later


47ad3bc9fc Vladimir Davydov

Fix gh_6634 test case

gh_6634_different_log_on_tuple_new_and_free_test.lua verifies that proper debug message gets into logs for tuple_new() and tuple_delete(): occasionally tuple_delete() printed wrong tuple address. However, still there are two debug logs: one in tuple_delete() and another one in memtx_tuple_delete(). So to avoid any possible confusions let's fix regular expression to find proper log so that now it definitely finds memtx_tuple_delete(). NO_CHANGELOG=<Test fix> NO_DOC=<Test fix>


0d944f901c Vladimir Davydov

net.box: explicitly forbid synchronous requests in triggers

Net.box triggers (on_connect, on_schema_reload) are executed by the net.box connection worker fiber so a request issued by a trigger callback can't be processed until the trigger returns execution to the net.box fiber. Currently, an attempt to issue a synchronous request from a net.box trigger leads to a silent hang of the connection, which is confusing. Let's instead raise an error until #7291 is implemented. We need to add the check to three places in the code: 1. luaT_netbox_wait_result for future:wait_result() 2. luaT_netbox_iterator_next for future:pairs() 3. conn._request for all synchronous requests. (We can't add the check to luaT_netbox_transport_perform_request, because conn._request may also call conn.wait_state, which would hang if called from on_connect or on_schema_reload trigger.) We also add an assertion to netbox_request_wait to ensure that we never wait for a request completion in the net.box worker fiber. Closes #5358 @TarantoolBot document Title: Synchronous requests are not allowed in net.box triggers An attempt to issue a synchronous request (e.g. `call`) from a net.box trigger (`on_connect`, `on_schema_reload`) now raises an error: "Synchronous requests are not allowed in net.box trigger" (Before https://github.com/tarantool/tarantool/issues/5358 was fixed, it silently hung.) Invoking an asynchronous request (see `is_async` option) is allowed, but the request will not be processed until the trigger returns and an attempt to wait for the request completion with `future:pairs()` or `future:wait_result()` will raise the same error.


e20e41df6e Vladimir Davydov

raft: get rid of fiber_set_cancellable in box/raft.c

`wal_write` has been adapted to spurious wakeups, so this protection is no longer needed (see 4bf52367a745bd4d33d4727e2a8c574f2da9094d). Part of #7166 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring


Branches



























































































Tags

Tree

.editorconfigcommits | blame
.gdbinitcommits | blame
.github/
.gitignorecommits | blame
.gitlab.mkcommits | blame
.gitmodulescommits | blame
.luacheckrccommits | blame
.travis.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/
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]
[![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
[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/