Skip to content
Snippets Groups Projects
  1. Oct 03, 2023
    • Sergey Bronnikov's avatar
      ci: run performance tests · 5edcb712
      Sergey Bronnikov authored
      Performance tests added to perf directory are not automated and
      currently we run these tests manually from time to time. From other side
      source code that used rarely could lead to software rot [1].
      
      The patch adds CMake target "test-perf" and GitHub workflow, that runs
      these tests in CI. Workflow is based on workflow release.yml, it builds
      performance tests and runs them.
      
      1. https://en.wikipedia.org/wiki/Software_rot
      
      NO_CHANGELOG=testing
      NO_DOC=testing
      NO_TEST=testing
      5edcb712
    • Sergey Bronnikov's avatar
      cmake: build performance tests only with release build · a63d291b
      Sergey Bronnikov authored
      Note that targets for running performance tests are generated only when
      CMAKE_BUILD_TYPE is equal to Release or RelWithDebug. Additionally, C++
      performance tests require Google Benchmark library. Using non-debug
      build and having installed Google Benchmark library is rare case, so I
      suppose we don't need to introduce CMake option for performance testing.
      
      NO_CHANGELOG=testing
      NO_DOC=testing
      NO_TEST=testing infrastructure
      a63d291b
    • Sergey Bronnikov's avatar
      perf: add targets for running C performance tests · 68623381
      Sergey Bronnikov authored
      The patch adds a targets for each C performance test in a directory
      perf/ and a separate target "test-c-perf" that runs all C performance
      tests at once.
      
      NO_CHANGELOG=testing
      NO_DOC=testing
      NO_TEST=test infrastructure
      68623381
    • Sergey Bronnikov's avatar
      perf: add targets for running Lua performance tests · 49d9a874
      Sergey Bronnikov authored
      The patch adds a targets for each Lua performance test in a directory
      perf/lua/ (1mops_write_perftest, box_select_perftest,
      uri_escape_unescape_perftest) and a separate target "test-lua-perf" that
      runs all Lua performance tests at once.
      
      NO_CHANGELOG=testing
      NO_DOC=testing
      NO_TEST=test infrastructure
      49d9a874
  2. Oct 02, 2023
  3. Sep 29, 2023
    • Serge Petrenko's avatar
      core: fix a wrong assertion on decimal comparison with double · f1b23896
      Serge Petrenko authored
      mp_compare_decimal_any_number erroneously assumed that any float or
      double from which a decimal can't be created is either infinite or NaN.
      This is not true. Any float greater than 1e38 can't fit into our decimal
      representation. When such a float got compared to a decimal, an
      assertion fired, which was wrong. Luckily, on release build the
      comparison was correct. Only the assertion is wrong. Fix it.
      
      Closes #8472
      
      NO_DOC=bugfix
      f1b23896
    • Magomed Kostoev's avatar
      box: introduce template parameters for the sort order check · 9cc5a0bb
      Magomed Kostoev authored
      Since the sort order check is not required for keys without
      descending parts it's decided to move the check to template,
      so that the keys that has no descending parts don't pay for
      the sort order check on each comparison.
      
      Created proxy functions with increasing number of template
      parameters to make the comparator selection code less
      branchy.
      
      `key_def_set_compare_func_for_func_index` has been renamed
      to `key_def_set_compare_func_of_func_index` in order to
      make the proxy-call fit in 80 lines.
      
      NO_DOC=see previous commits
      NO_TEST=see previous commits
      NO_CHANGELOG=see previous commits
      9cc5a0bb
    • Magomed Kostoev's avatar
      box: expose sort_order to C API · e9b55043
      Magomed Kostoev authored
      NO_CHANGELOG=see the previous commit
      
      @TarantoolBot document
      Title: C API update - added support for key part sort order.
      
      Looks like the `box_key_part_def_t` type isn't documented, but
      `BOX_KEY_PART_DEF_SORT_ORDER` bit field was added to its `flags`
      member. The possible values are:
      
      `BOX_KEY_PART_DEF_SORT_ORDER_ASC`: default sort order.
      `BOX_KEY_PART_DEF_SORT_ORDER_DESC`: reversed sort order.
      e9b55043
    • Magomed Kostoev's avatar
      box: expose sort_order to lua key_def API · dcf8bed3
      Magomed Kostoev authored
      * Add ability to specify sort_order when creating a key def via
        lua key_def API.
      * Update key_def.totable to also emit the sort order.
      
      NO_CHANGELOG=see the previous commit
      
      @TarantoolBot document
      Title: key_def API update - added support for key part sort order.
      
      The part sort order is specified the same way as in index creation:
      
      ```
      key_def.new({{1, 'unsigned', sort_order = 'desc'}})
      ```
      
      The sort order is now taken into account in comparison functions.
      
      Affected documentation: [link](https://www.tarantool.io/en/doc/latest/reference/reference_lua/key_def/)
      dcf8bed3
    • Magomed Kostoev's avatar
      box: implement sort_order in indexes · b1990b21
      Magomed Kostoev authored
      The `sort_order` parameter was introduced earlier but had no effect
      until now. Now it allows to specify a sort (iteration) order for
      each key part.
      
      The parameter is only applicable to ordered indexes, so any value
      except 'undef' for the `sort_order` is disallowed for all indexes
      except TREE. The 'undef' value of the `sort_order` field of the
      `key_part_def` is translated to 'asc' on `key_part` creation.
      
      In order to make the key def aware if its index is unordered, the
      signature of `key_def_new` has been changed: the `for_func_index`
      parameter has been moved to the new `flags` parameter and
      `is_unordered` flag has been introduced.
      
      Alternative iterator names has been introduced (which are aliases
      to regular iterators): box.index.FORWARD_[INCLUSIVE/EXCLUSIVE],
      box.index.REVERSE_[INCLUSIVE/EXCLUSIVE].
      
      By the way fixed the `key_hint_stub` overload name, which supposed
      to be called `tuple_hint_stub`.
      
      `tuple_hint` and `key_hint` template declarations has been changed
      because of the checkpatch diagnostics.
      
      Closes #5529
      
      @TarantoolBot document
      Title: Now it's possible to specify sort order of each index part.
      
      Sort order specifies the way indexes iterate over tuples with
      different fields in the same part. It can be either ascending
      (which is the case by default) and descending.
      
      Tuples with different ascending parts are sorted in indexes from
      lesser to greater, whereas tuples with different descending parts
      are sorted in the opposte order: from greater to lesser.
      
      Given example:
      
      ```lua
      box.cfg{}
      
      s = box.schema.create_space('tester')
      pk = s:create_index('pk', {parts = {
        {1, 'unsigned', sort_order = 'desc'},
        {2, 'unsigned', sort_order = 'asc'},
        {3, 'unsigned', sort_order = 'desc'},
      }})
      
      s:insert({1, 1, 1})
      s:insert({1, 1, 2})
      s:insert({1, 2, 1})
      s:insert({1, 2, 2})
      s:insert({2, 1, 1})
      s:insert({2, 1, 2})
      s:insert({2, 2, 1})
      s:insert({2, 2, 2})
      s:insert({3, 1, 1})
      s:insert({3, 1, 2})
      s:insert({3, 2, 1})
      s:insert({3, 2, 2})
      ```
      
      In this case field 1 and 3 are descending, whereas field 2 is
      ascending. So `s:select()` will return this result:
      
      ```yaml
      ---
      - [3, 1, 2]
      - [3, 1, 1]
      - [3, 2, 2]
      - [3, 2, 1]
      - [2, 1, 2]
      - [2, 1, 1]
      - [2, 2, 2]
      - [2, 2, 1]
      - [1, 1, 2]
      - [1, 1, 1]
      - [1, 2, 2]
      - [1, 2, 1]
      ...
      ```
      
      Beware, that when using other sort order than 'asc' for any field
      'GE', 'GT', 'LE' and 'LT' iterator lose their meaning and specify
      'forward inclusive', 'forward exclusive', 'reverse inclusive' and
      'reverse exclusive' iteration direction respectively. Given example
      above, `s:select({2}, {iterator = 'GT'})` will return this:
      
      ```yaml
      ---
      - [1, 1, 2]
      - [1, 1, 1]
      - [1, 2, 2]
      - [1, 2, 1]
      ...
      ```
      
      And `s:select({1}, {iterator = 'LT'})` will give us:
      
      ```yaml
      ---
      - [2, 2, 1]
      - [2, 2, 2]
      - [2, 1, 1]
      - [2, 1, 2]
      - [3, 2, 1]
      - [3, 2, 2]
      - [3, 1, 1]
      - [3, 1, 2]
      ...
      ```
      
      In order to be more clear alternative iterator aliases can be used:
      'FORWARD_INCLUSIVE', 'FORWARD_EXCLUSIVE', 'REVERSE_INCLUSIVE',
      'REVERSE_EXCLUSIVE':
      
      ```
      > s:select({1}, {iterator = 'REVERSE_EXCLUSIVE'})
      ---
      - [2, 2, 1]
      - [2, 2, 2]
      - [2, 1, 1]
      - [2, 1, 2]
      - [3, 2, 1]
      - [3, 2, 2]
      - [3, 1, 1]
      - [3, 1, 2]
      ...
      ```
      b1990b21
    • Magomed Kostoev's avatar
      box: refactor comparators · 1609b34c
      Magomed Kostoev authored
      Currently there's a huge code duplication in the comparators. In
      order to simplify further development without affecting performance
      field comparison was moved to a separated templated function.
      
      NO_TEST=refactoring
      NO_DOC=refactoring
      NO_CHANGELOG=refactoring
      1609b34c
    • Magomed Kostoev's avatar
      test: cover each comparison branch of each CE comparator · a0b8af39
      Magomed Kostoev authored
      The tests are required to perform safe refactoring of comparators.
      
      Covered comparison functions are:
      - `tuple_compare_sequential`: all valid `is_nullable` and
        `has_optional_parts` combinations.
      - `tuple_compare_with_key_sequential`: all valid `is_nullable` and
        `has_optional_parts` combinations.
      - `tuple_compare_slowpath`: all valid `is_nullable` and
        `has_optional_parts` combinations. `has_json_paths` and
        `is_multikey` options are not covered since they don't affect
        the comparison logic.
      - `tuple_compare_with_key_slowpath`: all valid `is_nullable` and
        `has_optional_parts` combinations. See the point above about
        other options.
      - `key_compare`: both `is_nullable` option variants.
      
      NO_DOC=new tests
      NO_CHANGELOG=new tests
      a0b8af39
    • Magomed Kostoev's avatar
      test: switch the key_def test to C++ · ab6ec7ee
      Magomed Kostoev authored
      Currently the test is written in C. To simplify the following test
      update it's required to switch the test to the C++ language.
      
      NO_DOC=refactoring
      NO_CHANGELOG=refactoring
      ab6ec7ee
    • Mergen Imeev's avatar
      box: do not log option value if it not changed · 9cf6100c
      Mergen Imeev authored
      After commit 9b2b3e58 ("box: apply dynamic cfg even if option
      value is unchanged"), running box.cfg{} with any parameters logs
      the values of those options, even if the option value has not changed.
      This is quite awkward for config as it gives a lot of options to
      box.cfg{}, although many of them may have the old value. This patch
      causes box.cfg{} to log only those options whose values have changed.
      
      Closes #9195
      
      NO_DOC=No need.
      NO_CHANGELOG=No need since the mentioned commit was not released yet.
      9cf6100c
    • Andrey Saranchin's avatar
      trigger: introduce tarantool.trigger.on_change triggers · a91da87c
      Andrey Saranchin authored
      New event named 'tarantool.trigger.on_change' is called when any event
      is modified (trigger.set or trigger.del). All the handlers are called with
      one argument - name of the modified event. Returned value of each handler
      is ignored. Handlers are fired after the event is changed (the event
      contains inserted trigger, if any, and does not contain deleted one, if
      any). All thrown errors are logged with error level and do not stop
      execution of triggers.
      
      Closes #8664
      
      NO_CHANGELOG=later
      NO_DOC=later
      a91da87c
    • Andrey Saranchin's avatar
      test: correct app-luatest/trigger_module_test.lua · 42abf4c0
      Andrey Saranchin authored
      Module trigger should be cleaned up after each test. It didn't cause any
      troubles because each test used a unique name of event for its purposes.
      Let's remove all registered triggers after each test for the sake of
      maintainability.
      
      Also, move the tests to a separate server instance - currently tests use
      tarantool which is a test runner, so it may affect other tests during a
      competitive launch.
      
      NO_CHANGELOG=test
      NO_DOC=test
      42abf4c0
    • Andrey Saranchin's avatar
      space: move all space triggers to the trigger registry · fa0a31b5
      Andrey Saranchin authored
      The patch moves space triggers to trigger registry. Triggers for each
      space are stored in two events: event, associated with space by name,
      and event, associated with space by id. For example, if we have a space
      named 'test' with id = 512, its on_replace trigger will be stored in
      'box.space[512].on_replace' and 'box.space.test.on_replace' events. When
      space triggers are fired, triggers, associated by id, are called first.
      Since the triggers are moved to trigger registry, space trigger API is
      slightly changed - it is populated with optional third argument (trigger
      name) and its key-value variant.
      
      One of the main advantages of using trigger registry is setting triggers
      before box.cfg{}, but it would not be used for before_replace triggers
      since they can change tuples on recovery, and most of the time the user
      does not need it. To solve this problem, we decided to disable space
      triggers on recovery. However, ability to change tuples during recovery
      is necessary (for example, to be able to override engine on replica),
      that is why the patch introduces recovery triggers for spaces - they are
      fired only on recovery. Similar to regular triggers, recovery triggers
      for each space are stored in two events. Recovery version of
      before_replace triggers for space 'test' with id 512 are stored in
      'box.space[512].before_recovery_replace' and
      'box.space.test.before_recovery_replace'. Triggers on_replace have their
      recovery version as well. Recovery triggers receive 2 arguments in
      addition to its regular versions - xrow header and xrow body of type
      MsgPack object. Both MsgPacks are maps with integer keys.
      
      Since regular and recovery triggers cannot be used at the same time, we
      store them at the same pointer in space - it refers to recovery triggers
      on recovery and to regular ones when recovery is over. To update the
      triggers, helper space_on_final_recovery_complete is used. However, it
      is not fired after bootstrap of a new master, and triggers of all
      spaces, created during bootstrap, would not be updated - a new helper
      space_on_bootstrap_complete is introduced.
      
      There is another, more serious, breakage of backward compatibility. All
      triggers were stored in the space - it means that after the space is
      renamed it still has all its triggers, and when the space is dropped, all
      the triggers are removed. This patch moves triggers of space to trigger
      registry, which is just a key-value storage of triggers. That is why space
      do not own its triggers anymore - it just takes triggers from trigger
      registry. So, when the space is renamed, all the triggers, associated by
      id, are still associated with the space, but not the triggers associated
      by name - the space will fire triggers from an event, associated with a
      space by its new name.
      
      In order to relieve the pain of broken compatibility, all the triggers,
      which are set with an old API, are set to an event, associated by id.
      Also, when one sets a space trigger with an old API, it is set to both
      regular version of trigger and a recovery one if recovery has not been
      finished yet. For example, s:before_replace(foo) will set a trigger to
      both 'box.space[512].before_replace' and
      'box.space[512].before_recovery_replace' events before recovery is
      finished and to the first event only after recovery.
      
      Along the way, fixed an assertion that failed when before_replace
      changed new tuple on recovery from snapshot.
      
      Also, message of error ER_BEFORE_REPLACE_RET is changed.
      The type of value, returned by before_replace triggers was in the
      message before, but new triggers are called with a func_apapter, which
      does not allow to get a type of returned value, so the type was removed
      from the message.
      
      Part of #8657
      Closes #8859
      Closes #9127
      
      NO_CHANGELOG=later
      NO_DOC=later
      fa0a31b5
    • Andrey Saranchin's avatar
      xrow: add pointer to data in xrow_header · 2822177f
      Andrey Saranchin authored
      Object xrow_header is a parsed MsgPack header of xrow packet. Since we
      are going to pass header and body of request in recovery triggers, we
      need to pass a pointer to the header of binary packet. Let's add such
      pointer to xrow_header object.
      
      Part of #8859
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      2822177f
    • Andrey Saranchin's avatar
      core: add is_empty method to func_adapter · ec757d35
      Andrey Saranchin authored
      Since before_replace triggers have different semantics for returned nil
      value and no return values, we need to distinguish between these cases.
      That is why func_adapter_is_null does not return true when no more
      values left anymore - new method func_adapter_is_empty is introduced
      for this purpose.
      
      Along the way, remove description of func_adapter_lua_is_bool function -
      it is copied description of is_null function, which was here by mistake.
      
      Part of #8657
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      ec757d35
    • Andrey Saranchin's avatar
      core: add msgpack to func_adapter · 09bd590d
      Andrey Saranchin authored
      The commit adds msgpack object to func_adapter. It is required to pass
      xrow object to recovery triggers.
      
      Part of #8859
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      09bd590d
  4. Sep 28, 2023
    • Gleb Kashkin's avatar
      config: allow postponing object grants till creation · ec74a1e2
      Gleb Kashkin authored
      Before this patch privileges for space, function and sequence alone
      were disabled. Only permission for universe could be granted. It was
      done because there wasn't a way to grant or revoke a privilege when
      subjecting object hasn't been created yet.
      
      This patch allows grants and revokes for objects that will be created
      after the applier. These actions will be postponed and executed via
      on_commit trigger after the object is registered in the according system
      space of box.space._space/_func/_sequence.
      
      Now permission can be granted to space/function/sequence from within the
      config.
      
      Part of #8967
      
      NO_DOC=documentation request will be filed manually for the whole
             credentials
      ec74a1e2
    • Gleb Kashkin's avatar
      test/config: upgrade reload_success_case() helper · 4cc6543c
      Gleb Kashkin authored
      Before this patch reload_success_case() didn't allow to pass arguments
      to verify_2() in the same way as to verify(). Now they can be passed
      via opts.verify_args_2.
      
      Part of #8967
      
      NO_DOC=test helper upgrade
      NO_CHANGELOG=see NO_DOC
      NO_TEST=see NO_DOC
      4cc6543c
    • Sergey Kaplun's avatar
      box: set default c_func_iproto_multireturn to new · 6cb39116
      Sergey Kaplun authored
      This patch sets the aforementioned option to new. This is a breaking
      change that makes the behaviour of the stored C functions called locally
      and remotely via iproto consistent.
      
      Closes #4799
      Relates to #8576
      
      NO_DOC=see previous commit
      6cb39116
    • Sergey Kaplun's avatar
      box: introduce c_func_iproto_multireturn in compat · 96ee6d9b
      Sergey Kaplun authored
      With this option enabled (new), the multiresults returned by a stored C
      function via iproto aren't wrapped in the additional msgpack array (old).
      
      Due to new behaviour some renames are performed:
      * `port_c_dump_msgpack()` -> `port_c_dump_msgpack_wrapped()`, since this
        is dump format with additional msgpack array encoded.
      * `port_c_dump_msgpack16()` -> `port_c_dump_msgpack()`, since this
        format is now the default new format of a msgpack dump.
      
      The behaviour of the C port msgpack dumping depends on the
      `c_func_iproto_multireturn` option:
      * uses `port_c_dump_msgpack()` if set to true (new),
      * uses `port_c_dump_msgpack_wrapped()` otherwise (old).
      
      Needed for #4799
      
      @TarantoolBot document
      Title: Document `c_func_iproto_multireturn` compat option
      
      Please create a documentation page for the new compat option:
      https://tarantool.io/compat/c_func_iproto_multireturn
      
      In the new behaviour, the multiresults returned by a stored C function
      via iproto aren't wrapped in the additional msgpack array (old).
      
      ```
      tarantool> compat.c_func_iproto_multireturn = 'old'
      ---
      ...
      
      tarantool> net_box.connect(box.cfg.listen):call('myclib.cfunc')
      ---
      - [true, -1]
      ...
      
      tarantool> compat.c_func_iproto_multireturn = 'new'
      ---
      ...
      
      tarantool> net_box.connect(box.cfg.listen):call('myclib.cfunc')
      ---
      - true
      - -1
      ...
      
      ```
      
      The new behaviour is consistent with the local call of the function
      via `box.func`:
      
      ```
      tarantool> box.func['myclib.cfunc']:call()
      ---
      - true
      - -1
      ...
      
      ```
      
      Assume you have a stored C function that returns values like the
      following:
      
      ```c
      char *position = mp_encode_bool(buffer, true);
      box_return_mp(ctx, buffer, position);
      /* ... */
      position = mp_encode_int(buffer, -1);
      box_return_mp(ctx, buffer, position);
      ```
      
      If you want to preserve the format of the returned array for your C
      functions, when the `c_func_iproto_multireturn` option is set to "new",
      you should add the additional wrapping, like the following:
      
      ```c
      char *position = mp_encode_array(buffer_with_results, n_results);
      position = mp_encode_bool(position, true);
      /* ... */
      position = mp_encode_int(position, -1);
      box_return_mp(ctx, buffer_with_results, position);
      ```
      
      The amount of `box_return_mp()` calls indicates the number of values to
      be returned.
      
      Also, you should update its usage via `box.func` if there is any.
      96ee6d9b
    • Sergey Vorontsov's avatar
      build: add dependency for dev/devel package · 11e62ebb
      Sergey Vorontsov authored
      This patch sets the `tarantool` package as a dependency for
      `tarantool-dev` and `tarantool-devel` packages.
      
      Follows up #8771
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      11e62ebb
    • Sergey Vorontsov's avatar
      build: add license files to packages · 9188a0c6
      Sergey Vorontsov authored
      Before this commit, packages were generated in one iteration because
      their contents were identical. Now, we need to put some files in the
      different paths depending on the package format. The simplest way to
      resolve this issue is to split creating packages into separate steps,
      one for RPM and one for DEB.
      
      Follows up #8771
      Closes tarantool/infra#188
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      9188a0c6
    • Sergey Vorontsov's avatar
      build: add man and readme files to server package · 6089c574
      Sergey Vorontsov authored
      Follows up #8771
      Part of tarantool/infra#188
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      6089c574
    • Pavel Balaev's avatar
      tarantoolctl: update luarocks to 3.9.2 · 1dc8cd81
      Pavel Balaev authored
      luarocks version updated to version 3.9.2
      
      Closes #6597
      
      NO_DOC=The engine has been updated, the functionality has not changed
      NO_TEST=see NO_DOC
      1dc8cd81
    • Oleg Babin's avatar
      box: fix crashes if some box.info functions called before box.cfg · d85556c9
      Oleg Babin authored
      Before this patch if one called `vinyl`, `sql`, `gc` and `memory`
      functions from box.info() instance crashed. It's interesting that
      `replication_anon` functions worked ok.
      This patch fixes that crashes.
      
      Closes #9173
      
      NO_DOC=bugfix
      d85556c9
    • Alexander Turenko's avatar
      config: add timeout options for failover service · 27c3c21d
      Alexander Turenko authored
      Part of https://github.com/tarantool/tarantool-ee/issues/564
      
      NO_DOC=The documentation request is to be added as part of Tarantool
             Enterprise Edition patchset.
      NO_CHANGELOG=see NO_DOC
      NO_TEST=To be tested in Tarantool Enterprise Edition.
      27c3c21d
    • Alexander Turenko's avatar
      box: skip 'entering the event loop' for failover · 1e5c19b3
      Alexander Turenko authored
      This message doesn't give any useful information for `tarantool
      --failover` run, because it always starts background fibers for
      monitoring purposes. Let's suppress the message in the case.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/564
      
      NO_DOC=It is a small visual improvement, there is nothing to document
             here.
      NO_CHANGELOG=It is part of Tarantool Enterprise Edition feature.
      NO_TEST=Doesn't worth it.
      1e5c19b3
    • Alexander Turenko's avatar
      cli: add --failover option and failover module stubs · fecd4691
      Alexander Turenko authored
      The option enables a built-in failover coordinator script, which reads a
      configuration from a file (pointed by --config option) or from etcd,
      connects to all the instances, polls them for their status and performs
      automatic actions to ensure that there is an active leader in each
      replicaset (if possible).
      
      The failover coordinator code is part of Tarantool Enterprise Edition.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/564
      
      NO_DOC=The documentation request is to be added as part of Tarantool
             Enterprise Edition patchset.
      NO_CHANGELOG=see NO_DOC
      NO_TEST=To be tested in Tarantool Enterprise Edition.
      fecd4691
    • Alexander Turenko's avatar
      config: split _collect() method · 664610e4
      Alexander Turenko authored
      It allows to reuse the code that collects the cluster configuration
      without checks against particular instance name.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/564
      
      NO_DOC=refactoring
      NO_CHANGELOG=see NO_DOC
      NO_TEST=see NO_DOC
      664610e4
    • Alexander Turenko's avatar
      config: move apply vars to instance config schema · fe5f9d7a
      Alexander Turenko authored
      I want to use it outside of the configdata code. It seems appropriate to
      expose it from the instance config schema, because it is a general
      purpose transformation of instance config data.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/564
      
      NO_DOC=refactoring
      NO_CHANGELOG=see NO_DOC
      NO_TEST=see NO_DOC
      fe5f9d7a
    • Serge Petrenko's avatar
      box: disable split-brain detection until schema is upgraded · a844bd37
      Serge Petrenko authored
      Our split-brain detection machinery relies among other things on all
      nodes tracking the synchro queue confirmed lsn. This tracking was only
      added together with the split-brain detection. Only the synchro queue
      owner tracked the confirmed lsn before.
      
      This means that after an upgrade all the replicas remember the latest
      confirmed lsn as 0, and any PROMOTE/DEMOTE request from the queue owner
      is treated as a split brain.
      
      Let's fix this and only enable split-brain detection on the replica set
      once the schema version is updated. Thanks to the synchro queue freeze
      on restart, this can only happen after a new PROMOTE or DEMOTE entry is
      written by one of the nodes, and thus the correct confirmed lsn
      is propagated with this PROMOTE/DEMOTE to all the cluster members.
      
      Closes #8996
      
      NO_DOC=bugfix
      a844bd37
  5. Sep 27, 2023
    • Mergen Imeev's avatar
      config: introduce --force-recovery CLI option · a3da7533
      Mergen Imeev authored
      This patch introduces a new CLI option: --force-recovery.
      
      Closes #8876
      
      @TarantoolBot document
      Title: --force-recovery CLI option
      
      The --force-recovery CLI option is another way to set the box.cfg{}
      force_recovery option. The priority of this option is higher than the
      priority of the TT_FORCE_RECOVERY environment variable, but less than
      the priority of explicitly setting the box.cfg{} force_recovery option.
      a3da7533
    • Igor Munkin's avatar
      luajit: bump new version · fcb41bb8
      Igor Munkin authored
      * test: fix fix-mips64-spare-side-exit-patching
      * test: fix `fillmcode()` generator helper
      * MIPS: Fix "bad FP FLOAD" assertion.
      * Handle table unsinking in the presence of IRFL_TAB_NOMM.
      * Fix handling of instable types in TNEW/TDUP load forwarding.
      * Fix frame for more types of on-trace error messages.
      * Fix frame for on-trace out-of-memory error.
      * Fix predict_next() in parser (again).
      * Always exit after machine code page protection change fails.
      
      Closes #562
      Part of #8825
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      fcb41bb8
  6. Sep 26, 2023
    • Vladimir Davydov's avatar
      sequence: use xmalloc where appropriate · 74f723bb
      Vladimir Davydov authored
      Allocations from fiber region and heap should never fail so it's okay to
      use xmalloc for them.
      
      This fixes the following coverity report complaining about unchecked
      region_alloc result:
      
      https://scan7.scan.coverity.com/reports.htm#v39198/p13437/fileInstanceId=149497639&defectInstanceId=19021351&mergedDefectId=1525560
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      74f723bb
    • Vladimir Davydov's avatar
      xlog: rework writer API · 0704ebb7
      Vladimir Davydov authored
      The goal of this patch is to make the xlog writer API less confusing.
      It does the following changes:
      
       - Rename xlog_rename to xlog_materialize. The function strips the
         .inprogress suffix from an xlog file name. Usually it's called after
         the xlog was sealed (by writing the EOF marker) and closed but it may
         also be called before xlog_close in case the xlog file is going to be
         appended to (used in WAL).
      
       - Make xlog_sync private. It's called by xlog_close so there's no point
         in calling it manually. Make xlog_close fail if it fails to sync the
         file.
      
       - Make xlog_close flush the buffer so that the caller doesn't need to
         call xlog_flush manually before closing an xlog file.
      
       - Drop the reuse_fd argument of xlog_close. Instead, introduce a new
         function xlog_close_reuse_fd that works exactly like xlog_close
         except it doesn't close the fd and returns it in the out argument.
      
       - Introduce xlog_discard. It's supposed to be called on an incomplete
         xlog file to close its fd and unlink it.
      
      Rework all the places where we write xlog files in accordance with the
      new API. Note about memtx snapshot writer: use xlog_materialize and
      xlog_discard instead of coio_rename and coio_unlink.
      
      The new API (especially the xlog_discard helper) facilitates
      introduction of thorough (secure) file deletion because it significantly
      reduces the number of places in the code where xlog files are deleted.
      
      Needed for tarantool/tarantool-ee#540
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      0704ebb7
  7. Sep 22, 2023
    • Alexander Turenko's avatar
      tools: add rebase-release-notes script · 3240201a
      Alexander Turenko authored
      The goal of the script is to assist with removing changelog entries that
      are already included into a release of another development branch.
      
      For example, if a bug fix is released as part of 2.11.3, there is no
      reason to highlight that it is fixed in 3.0.0. It is better to describe
      changes comparing to the latest present 2.11 release.
      
      The script was initially written for personal use and there are obvious
      points for improvements. However, it seems that it already simplifies
      some tasks, so I'm going to share it as is and improve later. I'll leave
      the relevant issue open.
      
      Part of #9135
      
      NO_DOC=The commit adds a development tool and doesn't touch anything in
             tarantool itself.
      NO_CHANGELOG=see NO_DOC
      NO_TEST=see NO_DOC
      3240201a
Loading