Commit Briefs

5c586da8e8 Sergey Bronnikov

test: fix flakiness in test (ligurio/gh-6128-fix-flaky-test-1)

Needed for # 6128 NO_CHANGELOG=fix test NO_DOC=fix test


47380bb762 Igor Munkin

test: fix flakiness in gh_6128_background_mode_test

Test runs an external process with tarantool that writes to a log file. Then test reads that log file and searches a string with required message in it (see function check_err_msg). Test was flaky on macOS and I suspect it was happening due to a high log level - timeout was not enough to wait message in the log file. Patch decreases a log level to a default value and replaces io functions with the similar alternatives in a fio module. Using fio functions allows to not block fibers. NO_CHANGELOG=test fix NO_DOC=test fix


8a25d170ea Vladimir Davydov

lua/xlog: don't ignore unknown header fields

The xlog reader Lua module uses the xlog_cursor_next_row, which decodes the row header with xrow_header_decode. The latter silently ignores any unknown fields, which complicates catching bugs when garbage is written to a row header by mistake, for example, see #8783. Let's parse a row header without using xrow_header_decode in the xlog reader module, like we parse a row body, and output all unknown/invalid keys as is. To do that, we have to extend the xlog cursor API with the new method xlog_cursor_next_row_raw that returns a pointer to the position in the tx buffer where the next xrow is stored without advancing it. To avoid a memory leak in case the caller fails to parse an xrow returned by this function, we also have to move the call to xlog_tx_cursor_destroy from xlog_tx_cursor_next_row to xlog_cursor_next_tx. While we are at it, - Don't raise an error if a key type encountered in a row body is invalid (not an integer). Instead, silently ignore such keys. - Remove the useless body MsgPack validness check because we already check it after decoding the header. - Add error injection based tests to check all the corner cases. NO_DOC=bug fix


f058cee74e Vladimir Davydov

txn: reset stream_id row header field

To avoid garbage written to xlog. Closes #8783 NO_DOC=bug fix NO_TEST=next commit


3e1c2772f6 Aleksandr Lyapunov

update: add tests related to multiple update to the same field

These are misc tests that can be related to the issue. Not sure all of them do not work before the patch set for the issue. It is nice to have them and be sure everything works fine. Closes #8658 NO_DOC=minor


7a8177bbc8 Aleksandr Lyapunov

update: fix xrow_update_err_double message usage

We can replace the last `xrow_update_err_double` occurrence with `xrow_update_err_no_such_field`. The last is correct one for this place as `xrow_update_op_do_field_##op_type` is called only for non terminal paths. Thus if XUPDATE_SCALAR is encountered then the field referenced does not exist. Part of #8658 NO_DOC=minor NO_CHANGELOG=minor


e4e9db7ef8 Aleksandr Lyapunov

update: reapply leaf bar '=' also

This will help to do further updates into into/inside affected field. It does not make much difference from the performance POV but allows to reuse existing code. Part of #8658 NO_CHANGELOG=later NO_DOC=minor


9ea5eae268 Aleksandr Lyapunov

update: turn leaf scalar bar to scalar

This way after branching the operation will be presented by XUPDATE_SCALAR in the parent array/map so that we can apply multiple operations to the same field. Part of #8658 NO_CHANGELOG=later NO_DOC=minor


5377ddb476 Aleksandr Lyapunov

update: use rope for multiple updates of string field

Current representation allows only single splice. Rope in turn allows for arbitrary number of updates and have good asymptotic. Using only rope gives 4% degradation of single update of the string field (full time of update operation is measured). Thus rope is started to use from the second update into the same string field. Part of #8658 NO_DOC=internal NO_CHANGELOG=internal


82ea347413 Aleksandr Lyapunov

update: remove double update checks

Now when groundwork is done it is time to unblock multiple updates to the same field. Note that along the way we fix one more case. For example 'bar' update on path '[2].a.b.c.d' and then setting on the path '[2].a.b.c'. Currently this leads to cryptic 'can not update map by non-string key' error. The issue is if new path is shorter than old path of the bar update which is to be branched then we exit path comparison loop when new_toke.type == JSON_TOKEN_END. Note that current code for handling double update of the same field for the bar case is not optimal. It will produce route node (optional), array or map node and node for field itself in the update tree. Instead we can have just same bar node which apply 2 scalar updates like in case of terminal update in map or array. This optimization is work to be done. Part of #8658 NO_DOC=minor NO_CHANGELOG=later


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/