Commit Briefs

408fab611d Sergey Bronnikov

httpc: replace ibuf_alloc with xibuf_alloc (ligurio/gh-xxxx-httpc-xibuf_alloc-2.11, origin/ligurio/gh-xxxx-httpc-xibuf_alloc-2.11)

There is no check for NULL for a value returned by `ibuf_alloc`, the NULL will be passed to `memcpy()` if the aforementioned function will return a NULL. The patch fixes that by replacing `ibuf_alloc` with macros `xibuf_alloc` that never return NULL. Found by Svace. NO_CHANGELOG=codehealth NO_DOC=codehealth NO_TEST=codehealth (cherry picked from commit b4ee146fde6e418aed590ac6054cff75c2a59626)


d615f3f74f Serge Petrenko

limbo: speed up synchronous transaction queue processing

This patch optimizes the process of collecting ACKs from replicas for synchronous transactions. Before this patch, collecting confirmations was slow in some cases. There was a possible situation where it was necessary to go through the entire limbo again every time the next ACK was received from the replica. This was especially noticeable in the case of a large number of parallel synchronous requests. For example, in the 1mops_write bench with parameters --fibers=6000 --ops=1000000 --transaction=1, performance increases by 13-18 times on small clusters of 2-4 nodes and 2 times on large clusters of 31 nodes. Closes #9917 NO_DOC=performance improvement NO_TEST=performance improvement (cherry picked from commit 4a866f64d64c610a3c8441835fee3d8dda5eca71)


c2c87816ff Serge Petrenko

vclock: introduce `vclock_nth_element` and `vclock_count_ge`

Two new vclock methods have been added: `vclock_nth_element` and `vclock_count_ge`. * `vclock_nth_element` takes n and returns whatever element would occur in nth position if vclock were sorted. This method is very useful for synchronous replication because it can be used to find out the lsn of the last confirmed transaction - it's simply the result of calling this method with argument {vclock_size - replication_synchro_quorum} (provided that vclock_size >= replication synchro quorum, otherwise it is obvious that no transaction has yet been confirmed). * `vclock_count_ge` takes lsn and returns the number of components whose value is greater than or equal to lsn. This can be useful to understand how many replicas have already received a transaction with a given lsn. Part of #9917 NO_CHANGELOG=Will be added in another commit NO_DOC=internal (cherry picked from commit 58f3c93b660499e85f08a4f63373040bcae28732)


e92f78068e Vladimir Davydov

memtx: do not pass NULL to memcpy when creating gap item in MVCC

According to the C standard, passing `NULL` to `memcpy` is UB, even if it copies nothing (number of bytes to copy is 0). The commit fixes such situation in memtx MVCC. Closes tarantool/security#129 NO_TEST=fix UB NO_CHANGELOG=fix UB NO_DOC=fix UB (cherry picked from commit 24d38cef5adff900bea2484235762678ac1c5234)


a800ccc68b Vladimir Davydov

test: disable fiber slice check in replica_apply_order test

Since commit e19bca5a74e8 ("box: check fiber slice in generic implementation of index count"), Vinyl's version of `index.count()` checks the fiber slice. As a result, the test may fail if it runs under a heavy load: ``` | @@ -94,6 +94,7 @@ | end | end; | | --- | + | - error: fiber slice is exceeded | | ... | -- Verify that at any moment max index is corresponding to amount of tuples, | -- which means that changes apply order is correct ``` Let's set the max fiber slice to a big value to avoid that. NO_DOC=test fix NO_CHANGELOG=test fix (cherry picked from commit b5fb66437a22ea65ed27c2ed14636e8036b079d3)


ca1e0dee60 Alexander Turenko

ci: fix module API publish job (again)

The new version of the publishing action leads to the following error: NOWRAP ``` Error: File not found: '/home/runner/work/_actions/JamesIves/github-pages-deploy-action/v4.6.6/lib/main.js' ``` NOWRAP Let's revert it to v4.6.4 (because v4.6.5 change was reverted in v4.6.6). See also https://github.com/JamesIves/github-pages-deploy-action/issues/1697 NO_DOC=no code changes NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC (cherry picked from commit 7cf41a1bb9b3f0a2eac82c296a764688f5d8b35c)


57816db81a Alexander Turenko

ci: fix module API build/publish job

The `ubuntu-latest` image is now `ubuntu-24.04`, see [1]. The job fails on this image with the following error: NOWRAP ``` CMake Error at /usr/local/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find Readline (missing: READLINE_INCLUDE_DIR READLINE_LIBRARY) ``` NOWRAP It seems, the libreadline-dev package is missing. Let's install it. Also, update a version of the publishing action to the latest at the moment. I didn't perform any check, but I guess that a new version of NodeJS is needed and the latest action version has better support of it. [1]: https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/ NO_DOC=no code changes NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC (cherry picked from commit 3e09e9f293925195ddebb13a4fcfd64762e52b89)


b4304df7f1 Vladimir Davydov

vinyl: fix crash when empty PK DDL races with DML

Vinyl doesn't support altering the primary index of a non-empty space, but the check forbidding this isn't entirely reliable - the DDL function may yield to wait for pending WAL writes to finish after ensuring that the space doesn't contain any tuples. If a new tuples is inserted into the space in the meantime, the DDL operation will proceed rebuilding the primary index and trigger a crash because the code is written on the assumption that it's rebuilding a secondary index: ``` ./src/box/vinyl.c:1572: vy_check_is_unique_secondary_one: Assertion `lsm->index_id > 0' failed. ``` Let's fix this by moving the check after syncing on WAL. Closes #10603 NO_DOC=bug fix (cherry picked from commit 955537b57c2aade58b7ca42501a9bbe50dd91f26)


41bcff0e8f Alexander Turenko

build: curl option BUILD_MISC_DOCS set OFF

Curl option BUILD_MISC_DOCS builds misc man pages and set ON by default. Other documentation building options such as ENABLE_CURL_MANUAL and BUILD_LIBCURL_DOCS was set OFF in BuildLibCurl.cmake. I suppose this option has to be added in commit 7192bf667917 ("third_party: update libcurl from 8.7.0 to 8.8.0+patches") and set OFF. Follows up #9885 NO_TEST=does not change tarantool behavior NO_DOC=does not change tarantool behavior (cherry picked from commit 1080995fa4083c4de6aa19e964b98f0ffb7e34c5)


55fffaed70 Vladimir Davydov

box: check fiber slice in generic implementation of index count

`index.count()` may hang for too long in Vinyl if a substantial consecutive hunk of the space is stored in memory. Let's add a fiber slice check to it to prevent it from blocking the TX thread for too long. Closes #10553 NO_DOC=bug fix (cherry picked from commit e19bca5a74e83d2521fe770f2a93c3e3d3ad4801)


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/