Commit Briefs

d1afa82aaa Sergey Bronnikov

lua: support conf module in command-line options (ligurio/gh-8613-embed-conf-module)

Attention: Patch contains a breaking change - default behaviour in tarantool is changed: by default "tarantool" command prints a usage and don't run a Lua interpeter. 1. https://github.com/tarantool/conf Closes #8613 @TarantoolBot document Title: introduce cli options for conf module Previously tarantool entered to interactive mode by starting Lua interpreter. Now 'tarantool' command prints a usage and don't run a Lua interpeter. Two new options were added: --name (-n) and --config (-c).


1e242024ee Sergey Bronnikov

lua: embed conf module

tarantool/conf [1] is a Lua module for configuring tarantool instance. Proposed patch embeds conf module to tarantool and adds regression tests for conf module. 1. https://github.com/tarantool/conf Part of #8613 @TarantoolBot document Title: embedded conf module Now tarantool has a conf module on its board. conf is a Lua module which is widely used by Tarantool users for configuration clusters with Tarantool instances.


52f6ed4d76 Vladimir Davydov

static-build: enable compiler optimizations for dependencies

An autoconf-generated configure script doesn't enable compiler optimization flags if CFLAGS / CXXFLAGS options are set explicitly. We started setting CFLAGS / CXXFLAGS in commit e6abe1c91ae3 ("cmake: add extra security compiler options"). As a result, users started experiencing performance degradation issues, like the one described in tarantool/tarantool-ee#440. Let's set -O2 in CFLAGS / CXXFLAGS explicitly to fix that. Closes #8606 Needed for tarantool/tarantool-ee#440 NO_DOC=build NO_TEST=build


d8faca69a6 Vladimir Davydov

lua: implement stubs for etcd client

To enable etcd client set the following CMake variables: - ENABLE_ETCD_CLIENT: ON - ETCD_CLIENT_DIR: path to a directory with etcd client Lua source files If ENABLE_ETCD_CLIENT is unset, then a stub implementation is built, which spits an error on attempt require etcd-client. Needed for https://github.com/tarantool/tarantool-ee/issues/443 MSG="stubs for enterprise version, no user-visible changes" NO_CHANGELOG=MSG NO_DOC=MSG NO_TEST=MSG


b71fa1a77a Yaroslav Lobankov

test: re-enable linearizable test after fix

The test flaked a lot on FreeBSD and Mac OS due to some proxy problems which were fixed in scope of tarantool/luatest@5b704ac. Another possible failure looked like this: NO_WRAP [006] not ok 5 linearizable-read.test_leader_change [006] # Can't modify data on a read-only instance - it is an orphan [006] # stack traceback: [006] # ...tarantool/test/replication-luatest/linearizable_test.lua:196: in function 'linearizable-read.test_leader_change' [006] # ... [006] # [C]: in function 'xpcall' NO_WRAP Fix it by waiting for the server to follow its upstreams. Closes tarantool/tarantool-qa#277 NO_DOC=test fix NO_CHANGELOG=test fix


ccf65854b9 Vladimir Davydov

replication: reload URIs of anon replicas on reconfiguration

In case box.cfg.replication isn't update by box.cfg, we don't try to reestablish replication connections, but we still need to reload URIs (recreate IO stream contexts created from URIs) because a URI parameter may store a path to an SSL certificate file, which could change. This was done in commit 655290aa7a8b3 ("replication: always reload URIs on reconfiguration"). There's a bug in the commit: it works as expected for appliers that already connected in the past and received UUID but it ignores anonymous appliers, i.e. appliers that never connected, as a result the following code fails: -- Configure replication using a wrong SSL certificate. -- This leaves anonymous appliers reconnecting in the background. box.cfg{replication = {...}} -- Update the SSL certificate file and reload replication URIs. -- At this point, the anonymous applier should finally connect. box.cfg{replication = box.cfg.replication} Needed for tarantool/tarantool-ee#432 NO_TEST=ee NO_DOC=bug fix NO_CHANGELOG=unreleased


5ce3114436 Vladimir Davydov

core: fix possible integer overflow in net_box.c

The netbox_transport_send_and_recv() function takes a part of the response size as a parameter, and it is possible that the resulting size could become larger than SIZE_MAX, resulting in an integer overflow and a segmentation fault. Closes #tarantool/security#121 NO_DOC=bugfix


f077ebf60f Serge Petrenko

replication: fix updating is_candidate in raft

Currently on applier death `is_candidate` is updated after trying to start election. So, raft assumes it has healthy quorum and bumps term even when there's not enough healthy nodes to do that. Trigger on updating above-mentioned flag is run in `replicaset_on_health_change`. So, let's move it before executing `raft_notify_is_leader_seen`, which tries to start election. Closes #8433 NO_DOC=bugfix


a27d958d06 Vladimir Davydov

sql: rework parsing of transaction statements

This patch reworks the parsing of statements associated with transactions. There are six of them: START TRANSACTION; COMMIT; ROLLBACK; SAVEPOINT savepoint_name; RELEASE [SAVEPOINT] savepoint_name; ROLLBACK TO savepoint_name; Prior to this patch, VDBE for these statements were generated while the statement was in the process of being parsed. After this patch, VDBE for all these statements will be generated only after the parsing has successfully completed. Part of #5485 NO_DOC=Will be added later NO_TEST=No user-visible changes are made NO_CHANGELOG=Will be added later


ecdf3c532d Vladimir Davydov

iproto: always reload URIs on reconfiguration

Even if the new value of box.cfg.listen is the same as the old one, we still need to recreate evio service entries' IO stream contexts from the URIs on reconfiguration, because a URI parameter may store a path to a file (for example, an SSL certificate), which could change. Note that we have to rework the way how IO stream contexts are handled on evio_service_attach. Before this patch, we copied struct iostream_ctx directly from the source service to the attached service. It was fine, because (a) we didn't destroy iostream_ctx on detach (we only cleared it) and (b) we detached IPROTO threads' services from tx_binary before stopping tx_binary. Now, to reload URIs, we first call the new function evio_service_reload_uris on tx_binary to recreate iostream_ctx, and only then reattach IPROTO threads' services, which opens a window for an IPROTO thread's service to access a destroyed iostream_ctx context while accepting a new connection. To avoid that, we now copy iostream_ctx to attached services with the new function iostream_ctx_copy. This function copies the underlying SSL_CTX with a stub function ssl_iostream_ctx_dup, which will be implemented in the EE repository using SSL_CTX_up_ref (i.e. no actual copying will happen - we'll just increment the internal SSL_CTX reference counter). Needed for tarantool/tarantool-ee#432 NO_DOC=ee NO_TEST=ee NO_CHANGELOG=ee


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/
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/