- Description:
- [Mirror] Middleware for data
- Last Change:
- Clone URL:
Commit Briefs
ci: add integration testing for etcd-client (ligurio/gh-9093-etcd-client-reusable-workfow)
Add workflow job for integration testing of the etcd-client module. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
test: cover port implementations with unit tests
The commit introduces new `unit/port.cc` test that covers almost all port implementations and almost all port methods. This test was intended as a testing point for future port changes. Implementations `port_sql` and `port_vdbemem` and method `dump_vdbemem` are not tested because I don't know much about the sql subsystem. For the same reason, I didn't tested `port_dump_msgpack_with_context`. Method `dump_msgpack_16` is not actually supported, but it is still used for compatibility with very old connectors. The problem is I found a bug in `port_c_dump_msgpack_16` while writing the test, and we don't want to fix it - probably, we will get rid of this method in future. Method `dump_plain` is not tested because it requires functions from `console.lua` file - it is easier to test `console.push` from Lua then loading the Lua file in unit test. The file has .cc extension because the test requires user_cache susbystem, which has init and free methods available only from C++ source files. NO_CHANGELOG=test NO_DOC=test
test: include lua headers in extern "C" scope
Lua headers don't have C++ guards which means all Lua symbols are mangled as C++ ones when the files included in a C++ source file, but then the linker fails because all Lua functions are exported with C mangling. Let's include lua headers in extern "C" scope to allow to use "lua_test_utils.h" in unit tests written in C++. NO_CHANGELOG=test NO_DOC=test
port_c: drop assertion in port_c_dump_lua method
The method actually supports all modes of dump to Lua, but the assertion checks that mp_object mode is never used - the commit drops the assertion. This mode is tested with a tuple constraint taking raw args. Along the way, some test cases are enabled back because the bug that caused them to be disabled has been fixed. NO_CHANGELOG=internal NO_DOC=internal
error: hide redundant fields of box.error.unpack()
Closes #9101 @TarantoolBot document Title: hide redundant fields of box.error.unpack() Do not show redundant fields of box.error.unpack(). These are `base_type`, `custom_type` and `code` if the latter is 0. New behaviour is available if `box_error_unpack_type_and_code` compat option is 'new'. Default value is 'old` currently. (The https://tarantool.io/compat/box_error_unpack_type_and_code is to be added.)
Remove broken symlink debian/tarantool.service
Leads nowhere after commit 216b6243bba1 ("tools: remove tarantoolctl utility"). NO_DOC=cleanup NO_TEST=cleanup NO_CHANGELOG=cleanup
core: do not limit the length of an error message by 512 bytes
Now the error message is allocated by `malloc' if it doesn't fit into the static buffer. Closes #4975 NO_DOC=bugfix
perf: add a BPS tree benchmark
The benchmark tests the tree build, key search, insert and delete operations performance. The latter are tested both including and excluding the tree reballancing overhead. A very simple allocator had been introduced to mitigate the memory management overhead and noise. The benchmark functions are templated. This allows to test multiple tree configurations using the same benchmarking routines. The simplest tree configuration is used, though it's possible to add new configurations to the benchmark. Example on how to create a tree similar to the one used by the memtx index is shown in the appendix A. Closes #9630 NO_DOC=new benchmark NO_TEST=new benchmark NO_CHANGELOG=new benchmark APPENDIX A: Adding a new tree configuration to the benchmark. ```C /* Instantiate the tree. */ #define tree_s128_EXTENT_SIZE 16 * 1024 #define tree_s128_elem_t struct tree_s128_elem #define tree_s128_key_t struct tree_s128_key struct tree_s128_elem { void *tuple; /* Unused. */ int64_t hint; tree_s128_elem() = default; tree_s128_elem(int64_t hint) : hint(hint) {} }; struct tree_s128_key { void *key; /* Unused. */ uint32_t part_count; /* Unused. */ int64_t hint; tree_s128_key(int64_t hint) : hint(hint) {} }; #define BPS_TREE_NAME tree_s128_t #define BPS_TREE_BLOCK_SIZE 512 #define BPS_TREE_EXTENT_SIZE tree_s128_EXTENT_SIZE #define BPS_TREE_IS_IDENTICAL(a, b) ((a).hint == (b).hint) #define BPS_TREE_COMPARE(a, b, arg) ((a).hint - (b).hint) #define BPS_TREE_COMPARE_KEY(a, b, arg) ((a).hint - (b).hint) #define bps_tree_elem_t tree_s128_elem_t #define bps_tree_key_t tree_s128_key_t #define bps_tree_arg_t int #include "salad/bps_tree.h" #undef BPS_TREE_NAME #undef BPS_TREE_BLOCK_SIZE #undef BPS_TREE_EXTENT_SIZE #undef BPS_TREE_IS_IDENTICAL #undef BPS_TREE_COMPARE #undef BPS_TREE_COMPARE_KEY #undef bps_tree_elem_t #undef bps_tree_key_t #undef bps_tree_arg_t /** Add the new tree to the `generate_benchmarks` macro. */ #define generate_benchmarks(generator, func, arg) \ generator(tree_i64, func, arg); \ generator(tree_s128, func, arg) /* < The line to be added. */ /** Create the new tree class. */ CREATE_TREE_CLASS(tree_i64); CREATE_TREE_CLASS(tree_s128); /* < The line to be added. */ ```
config: add ordered dictionary (internal module)
In development of the configuration module we met several cases, when an order of appearance of some items is as important as a constant time access using a key. This commit adds a collection that serves such a need. It is to be used internally in the src/box/lua/config code. The module is inspired by Python's collections.OrderedDict. See the description in the module code for details. NO_DOC=the module is for internal use, at least for now NO_CHANGELOG=see NO_DOC
ci: use Ubuntu Jammy for checkpatch
It brings newer codespell version: 2.1.0. Ubuntu Focal offers 1.16.0. Fixes tarantool/checkpatch#70 NO_DOC=CI adjustment NO_CHANGELOG=see NO_DOC NO_TEST=see NO_DOC
Branches
Tree
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/