Skip to content
Snippets Groups Projects
  1. Jul 21, 2022
    • Nikita Zheleztsov's avatar
      test: refactor gh_6305_net_box_autocomplete · a5179846
      Nikita Zheleztsov authored
      Test is needed to be updated every time net.box's internals are patched
      (e.g. in case of adding new functions of deleting old ones), as the order
      of suggested autocomplete options changes.
      
      Let's replace `assert_equals` with `assert_items_equals`, which is not
      order dependent.
      
      NO_DOC=test
      NO_CHANGELOG=test
      a5179846
  2. Jul 19, 2022
  3. Jul 15, 2022
    • Vladimir Davydov's avatar
      memtx: refactor tuple read view API · b87ef00b
      Vladimir Davydov authored
      This commit replaces enter/leave_delayed_free_mode() MemtxAllocator
      methods with open/close_read_view(). The open_read_view() method
      returns a pointer to the new read view, which is supposed to be pssed
      to close_read_view() when the read view is no longer needed. The new
      API will allow us to optimize garbage collection, see #7185.
      
      Currently, open_read_view() always returns nullptr and both ReadView
      and memtx_read_view_opts are empty structs. We will extend them in
      the future.
      
      Closes #7364
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      b87ef00b
    • Vladimir Davydov's avatar
      test: add unit test for MemtxAllocator · 0381159c
      Vladimir Davydov authored
      Checking #7185 with functional tests is complicated. Let's add a unit
      test for this.
      
      Needed for #7185
      
      NO_DOC=test
      NO_CHANGELOG=test
      0381159c
  4. Jul 14, 2022
    • Nikolay Shirokovskiy's avatar
      console: use streams in binary console · 29542070
      Nikolay Shirokovskiy authored
      Now we can make interactive transactions like in case of
      local or txt remote consoles if peer supports streams.
      
      Closes #7413
      
      NO_DOC=minor change
      29542070
    • Nikolay Shirokovskiy's avatar
      console: rollback txn on eval error if begin was in expr · b013233f
      Nikolay Shirokovskiy authored
      The issue is if in binary remote console a error is thrown in expression
      like "box.begin() error('something') box.commit()" then it is
      overwritten by iproto check for active transactions at the end of eval.
      The solution is to rollback active transaction in this case in console
      code before iproto check.
      
      Let's also assert in tests a behaviour that after successful transaction
      begin it stays active in next evaluations (successful or not) until
      explicit rollback.
      
      Closes #7288
      
      NO_DOC=minor change
      b013233f
    • Nikolay Shirokovskiy's avatar
      test: fix luatest server to work after chdir · b5e59bd9
      Nikolay Shirokovskiy authored
      Starting server is failed after chdir(3) for example if we call
      box.cfg{} with work_dir set.
      
      NO_DOC=fix testing harness
      NO_TEST=fix testing harness
      NO_CHANGELOG=fix testing harness
      b5e59bd9
    • Nikolay Shirokovskiy's avatar
      test: rename socketdir to vardir in luatest server · 42727489
      Nikolay Shirokovskiy authored
      We keep per server directories there too, not only socket files.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      42727489
    • Nikolay Shirokovskiy's avatar
      test: fix box/transaction.test.lua · 6a508fc3
      Nikolay Shirokovskiy authored
      The ; separator was missed after select (check the first hunk) and as
      a result the rollback was not executed. So the next test was failed merely
      due to the unfinished transaction of the previous test.
      
      We also need to fix the third test to use a different tuple.
      Also fix a couple of comments.
      
      NO_DOC=test fix
      NO_TEST=test fix
      NO_CHANGELOG=test fix
      6a508fc3
    • Ilya Verbin's avatar
      lua-yaml: encode malformed error messages in base64 · 8f799cd8
      Ilya Verbin authored
      If MP_ERROR contains an error message with invalid UTF-8 sequences,
      encode it in Base64 to obtain printable string.
      
      Closes #6781
      Closes #6934
      
      NO_DOC=bugfix
      8f799cd8
    • Serge Petrenko's avatar
      box: fix finding snapshot in upgrade script · 30db3c23
      Serge Petrenko authored
      The upgrade script first tries to determine if the node is booted from
      old snaps not recoverable on current Tarantool versions. If this is the
      case, it sets up special triggers so that snaps are automatically
      converted to a suitable format.
      
      This happens before box.cfg{}, so the workdir is not set at this point
      in time, and the upgrade script should take configured work_dir into
      account explicitly. Fix this.
      
      Closes #7232
      
      NO_DOC=bugfix
      30db3c23
  5. Jul 12, 2022
    • Mergen Imeev's avatar
      sql: introduce OpenSpace opcode · 49109769
      Mergen Imeev authored
      Prior to this patch, some opcodes could use a pointer to struct space
      that was set during parsing. However, the pointer to struct space is not
      really something that defines spaces. A space can be identified by its
      ID or name. In most cases, specifying space by pointer works fine, but
      truncate() changes the pointer to space, resulting in a sigfault for
      prepared statements using the above opcodes. To avoid this problem, a
      new opcode has been introduced. This opcode uses the space ID to
      determine the pointer to the struct space at runtime and stores it in
      the MEM, which is later used in the mentioned opcodes.
      
      Closes #7358
      
      NO_DOC=bugfix
      49109769
    • Vladimir Davydov's avatar
      memtx: allocate functional index key parts as tuples · 6cd463e1
      Vladimir Davydov authored
      Functional index keys are allocated and freed with MemtxAllocator's
      alloc and free methods. In contrast to tuples, which are allocated and
      freed with alloc_tuple and free_tuple, freeing a functional index key
      happens immediately, irrespective of whether there's a snapshot in
      progress or not. It's acceptable, because snapshot only uses primary
      indexes, which can't be functional. However, to reuse the snapshot
      infrastructure for creating general purpose user read views, we will
      need to guarantee that functional index keys stay alive until all read
      views using them are closed.
      
      To achieve that, this commit turns functional index keys into tuples,
      which automatically makes them linger if there's an open read view.
      We use the same global tuple format for allocating functional keys,
      because the key format is checked in key_list_iterator_next.
      
      Closes #7376
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      6cd463e1
  6. Jul 11, 2022
    • Ilya Verbin's avatar
      core: fix potential misorder of latch waiters · 294e8379
      Ilya Verbin authored
      Currently the latch doesn't guarantee the order in which it is acquired
      by fibers, which requested it. E.g. it is possible to wake up spuriously
      a fiber which is yielding in the latch_lock, it will be removed from
      l->queue by fiber_make_ready, then it will be inserted to l->queue
      again, but for this time, to the head of the list instead of its
      original place in the queue.
      
      Fix this by using latch_waiter structure, which is linked into l->queue.
      
      Part of #7166
      
      @TarantoolBot document
      Title: Update box_latch_lock description
      Since: 2.11
      
      Add "Locks are acquired in the strict order as they were requested." to
      the box_latch_lock description in C API reference - Module latch.
      294e8379
  7. Jul 08, 2022
    • Yaroslav Lobankov's avatar
      build: fix error on FreeBSD 13.1 · 15b823f0
      Yaroslav Lobankov authored
      This patch fixes the following error while tarantool build on
      FreeBSD 13.1:
      
          [100%] Linking CXX executable watcher.test
          ld: error: undefined symbol: set_sigint_cb
          >>> referenced by console.c:261 (lua/console.c:261)
          >>>               console.c.o:(lbox_console_readline) in
                              archive ../../src/box/libbox.a
          >>> referenced by console.c:342 (lua/console.c:342)
          >>>               console.c.o:(lbox_console_readline) in
                              archive ../../src/box/libbox.a
          >>> referenced by console.c:352 (lua/console.c:352)
          >>>               console.c.o:(lbox_console_readline) in
                              archive ../../src/box/libbox.a
          >>> referenced 1 more times
          c++: error: linker command failed with exit code 1
              (use -v to see invocation)
          gmake[2]: *** [test/unit/CMakeFiles/watcher.test.dir/build.make:152:
              test/unit/watcher.test] Error 1
          gmake[1]: *** [CMakeFiles/Makefile2:10528:
              test/unit/CMakeFiles/watcher.test.dir/all] Error 2
          gmake: *** [Makefile:156: all] Error 2
      
      NO_DOC=minor changes
      NO_TEST=minor changes
      NO_CHANGELOG=minor changes
      15b823f0
    • Vladimir Davydov's avatar
      test: fix cleanup in vinyl-luatest/gh_6565_hot_standby_unsupported test · 6213907c
      Vladimir Davydov authored
      The gh_6565 test doesn't stop the hot standby replica it started,
      because the replica should fail to initialize and exit eventually
      anyway. However, if the replica lingers until the next test due to
      https://github.com/tarantool/test-run/issues/345, the next test may
      successfully connect to it, which is likely to lead to a failure,
      because UNIX socket paths used by luatest servers are not randomized.
      
      For example, here gh_6568 test fails after gh_6565, because it uses the
      same alias for the test instance ('replica'):
      
      NO_WRAP
      [008] vinyl-luatest/gh_6565_hot_standby_unsupported_>                 [ pass ]
      [008] vinyl-luatest/gh_6568_replica_initial_join_rem>                 [ fail ]
      [008] Test failed! Output from reject file /tmp/t/rejects/vinyl-luatest/gh_6568_replica_initial_join_removal_of_compacted_run_files.reject:
      [008] TAP version 13
      [008] 1..1
      [008] # Started on Fri Jul  8 15:30:47 2022
      [008] # Starting group: gh-6568-replica-initial-join-removal-of-compacted-run-files
      [008] not ok 1  gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup
      [008] #   builtin/fio.lua:242: fio.pathjoin(): undefined path part 1
      [008] #   stack traceback:
      [008] #         builtin/fio.lua:242: in function 'pathjoin'
      [008] #         ...ica_initial_join_removal_of_compacted_run_files_test.lua:43: in function 'gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup'
      [008] #         ...
      [008] #         [C]: in function 'xpcall'
      [008] replica | 2022-07-08 15:30:48.311 [832856] main/103/default.lua F> can't initialize storage: unlink, called on fd 30, aka unix/:(socket), peer of unix/:(socket): Address already in use
      [008] # Ran 1 tests in 0.722 seconds, 0 succeeded, 1 errored
      NO_WRAP
      
      Let's fix this by explicitly killing the hot standby replica. Since it
      could have exited voluntarily, we need to use pcall, because server.stop
      fails if the instance is already dead.
      
      This issue is similar to the one fixed by commit 85040161 ("test:
      stop server started by vinyl-luatest/update_optimize test").
      
      NO_DOC=test
      NO_CHANGELOG=test
      6213907c
    • Nikolay Shirokovskiy's avatar
      http_parser: fix parsing HTTP protocol version · 9ee7e568
      Nikolay Shirokovskiy authored
      Handle status header response like 'HTTP/2 200' with version without
      dot.
      
      Closes #7319
      
      NO_DOC=bugfix
      9ee7e568
    • Nikolay Shirokovskiy's avatar
      box: fix unexpected error on granting privileges to admin · aaf6f8e9
      Nikolay Shirokovskiy authored
      We use LuaJIT 'bit' module for bitwise operations. Due to platform
      interoperability it truncates arguments to 32bit and returns signed
      result. Thus on granting rights using bit.bor to admin user which
      have 0xffffffff rights (from bootstrap snapshot) we get -1 as a result.
      This leads to type check error given in issue later in execution.
      
      Closes #7226
      
      NO_DOC=minor bugfix
      aaf6f8e9
    • Vladimir Davydov's avatar
      memtx: move allocator stuff from memtx_engine to MemtxAllocator · c7e3eae9
      Vladimir Davydov authored
      Let's hide all the logic regarding delayed freeing of memtx tuples to
      MemtxAllocator and provide memtx_engine with methods for allocating and
      freeing tuples (not memtx_tuples, just generic tuples). All the tuple
      and snapshot version manipulation stuff is now done entirely in
      MemtxAllocator.
      
      This is a preparation for implementing a general-purpose tuple read view
      API in MemtxAllocator, see #7364.
      
      Note, since memtx_engine now deals with the size of a regular tuple,
      which is 4 bytes less than the size of memtx_tuple, this changes the
      size reported by OOM messages and the meaning of memtx_max_tuple_size,
      which now limits the size of a tuple, not memtx_tuple.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      c7e3eae9
    • Mergen Imeev's avatar
      sql: fix error in ORDER BY ephemeral space format · 64cdb80c
      Mergen Imeev authored
      This patch fixes a bug where the ANY field type was replaced by the
      SCALAR field type in the ephemeral space used in ORDER BY.
      
      Closes #7345
      
      NO_DOC=bugfix
      64cdb80c
    • Mergen Imeev's avatar
      sql: ariphmetic of unsigned values · 3715f632
      Mergen Imeev authored
      After this patch, the result type of arithmetic between two unsigned
      values will be INTEGER.
      
      Closes #7295
      
      NO_DOC=bugfix
      3715f632
  8. Jul 07, 2022
    • Ilya Verbin's avatar
      coio: do exec after fork in unit/coio.test · 8b5bcd92
      Ilya Verbin authored
      This makes the test more real-life, and allows not to bother in the
      child process with the memory allocated prior to fork.
      
      Closes #7370
      
      NO_DOC=test fix
      NO_CHANGELOG=test fix
      8b5bcd92
    • Igor Munkin's avatar
      test: remove tests from fragile list · c245e201
      Igor Munkin authored
      Since "x64/LJ_GC64: Fix fallback case of asm_fuseloadk64()."
      (42853793ec3e6e36bc0f7dff9d483d64ba0d8d28) is backported into
      tarantool/luajit trunk, box/bitset.test.lua and box/function1.test.lua
      tests are no more fragile.
      
      Follows up tarantool/tarantool-qa#234
      Follows up tarantool/tarantool-qa#235
      
      NO_DOC=test changes
      NO_CHANGELOG=test changes
      NO_TEST=test changes
      c245e201
  9. Jul 06, 2022
    • Yaroslav Lobankov's avatar
      test: fix box-py/args.test.py · 11166382
      Yaroslav Lobankov authored
      This patch fixes `box-py/args.test.py` test and allows it to work
      against tarantool installed from a package.
      
      Closes tarantool/tarantool-qa#246
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      11166382
    • Yaroslav Lobankov's avatar
      test: fix app-tap/tarantoolctl.test.lua · 91143500
      Yaroslav Lobankov authored
      This patch fixes `app-tap/tarantoolctl.test.lua` test and allows it to
      work against tarantool installed from a package.
      
      Part of tarantool/tarantool-qa#246
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      91143500
    • Yaroslav Lobankov's avatar
      test: fix gh-1700-abort-recording-on-fiber-switch.test.lua · d6a6fc23
      Yaroslav Lobankov authored
      This patch fixes `gh-1700-abort-recording-on-fiber-switch.test.lua` test
      and allows it to work against tarantool installed from a package.
      
      Part of tarantool/tarantool-qa#246
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      d6a6fc23
    • Yaroslav Lobankov's avatar
      test: add new `make` test targets · 9adedc1f
      Yaroslav Lobankov authored
      This patch adds the new `make` test targets to run unit and functional
      tests independending on each other. In some cases it can be useful.
      
      New test targets:
      
      * `test-unit` - run unit tests and exit after the first failure
      * `test-unit-force` - run unit tests
      * `test-func` - run functional tests and exit after the first failure
      * `test-func-force` - run functional tests
      
      Note, tests for 'small' lib are considered as unit tests as well.
      
      Part of tarantool/tarantool-qa#246
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      9adedc1f
    • Nikolay Shirokovskiy's avatar
      test: use default readline configuration for a test · 1cd1a2df
      Nikolay Shirokovskiy authored
      If readline 'show-mode-in-prompt' is on then test fails because it does
      not handle prefix added to prompt in this mode. Let's use default
      (compiled in) readline configuration instead of the one provided by
      user or system config.
      
      NO_DOC=test changes
      NO_CHANGELOG=test changes
      NO_TEST=test changes
      1cd1a2df
    • Georgiy Lebedev's avatar
      memtx: fix story delete statement list · 654cf498
      Georgiy Lebedev authored
      Current implementation of tracking statements that delete a story has a
      flaw, consider the following example:
      
      tx1('box.space.s:replace{0, 0}') -- statement 1
      
      tx2('box.space.s:replace{0, 1}') -- statement 2
      tx2('box.space.s:delete{0}') -- statement 3
      tx2('box.space.s:replace{0, 2}') -- statement 4
      
      When statement 1 is prepared, both statements 2 and 4 will be linked to the
      delete statement list of {0, 0}'s story, though, apparently, statement 4
      does not delete {0, 0}.
      
      Let us notice the following: statement 4 is "pure" in the sense that, in
      the transaction's scope, it is guaranteed not to replace any tuple — we
      can retrieve this information when we check where the insert statement
      violates replacement rules, use it to determine "pure" insert statements,
      and skip them later on when, during preparation of insert statements, we
      handle other insert statements which assume they do not replace anything
      (i.e., have no visible old tuple).
      
      On the contrary, statements 1 and 2 are "dirty": they assume that they
      replaced nothing (i.e., there was no visible tuple in the index) — when one
      of them gets prepared — the other one needs to be either aborted or
      relinked to replace the prepared tuple.
      
      We also need to fix relinking of delete statements from the older story
      (in terms of the history chain) to the new one during preparation of insert
      statements: a statement needs to be relinked iff it comes from a different
      transaction (to be precise, there must, actually, be no more than one
      delete statement from the same transaction).
      
      Additionally, add assertions to verify the invariant that the story's
      add (delete) psn is equal to the psn of the add (delete) statement's
      transaction psn.
      
      Closes #7214
      Closes #7217
      
      NO_DOC=bugfix
      654cf498
  10. Jul 05, 2022
    • Vladimir Davydov's avatar
      test: stop server started by vinyl-luatest/update_optimize test · 85040161
      Vladimir Davydov authored
      Normally, if a server created by a test isn't stopped it should be
      forcefully killed by luatest or test-run. For some reason, it doesn't
      happen sometimes, which may lead to the next test failing to bind,
      because all test servers that belong to the same luatest suite and have
      the same alias share the same socket path (although they use different
      directories). This looks like a test-run or luatest bug.
      
      The vinyl-luatest/update_optimize test doesn't stop the test server
      so because of this test-run/luatest bug, the next vinyl-luatest test
      fails occasionally:
      
      NO_WRAP
      [001] vinyl-luatest/update_optimize_test.lua                          [ pass ]
      [001] vinyl-luatest/gh_6568_replica_initial_join_rem>                 [ fail ]
      [001] Test failed! Output from reject file /tmp/t/rejects/vinyl-luatest/gh_6568_replica_initial_join_removal_of_compacted_run_files.reject:
      [001] TAP version 13
      [001] 1..1
      [001] # Started on Tue Jul  5 13:30:37 2022
      [001] # Starting group: gh-6568-replica-initial-join-removal-of-compacted-run-files
      [001] master | 2022-07-05 13:30:37.530 [189564] main/103/default.lua F> can't initialize storage: unlink, called on fd 25, aka unix/:(socket), peer of unix/:(socket): Address already in use
      [001] ok     1  gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup
      [001] not ok 1  gh-6568-replica-initial-join-removal-of-compacted-run-files.test_replication_compaction_cleanup
      [001] #   Failure in after_all hook: /home/vlad/.rocks/share/tarantool/luatest/process.lua:100: kill failed: 256
      [001] #   stack traceback:
      [001] #         .../src/tarantool/tarantool/test/luatest_helpers/server.lua:206: in function 'stop'
      [001] #         ...src/tarantool/tarantool/test/luatest_helpers/cluster.lua:44: in function 'drop'
      [001] #         ...ica_initial_join_removal_of_compacted_run_files_test.lua:34: in function <...ica_initial_join_removal_of_compacted_run_files_test.lua:33>
      [001] #         ...
      [001] #         [C]: in function 'xpcall'
      [001] # Ran 1 tests in 1.682 seconds, 0 succeeded, 1 errored
      NO_WRAP
      
      Let's fix this by stopping the test server started by the
      vinyl-luatest/update_optimize test.
      
      NO_DOC=test
      NO_CHANGELOG=test
      85040161
    • Vladimir Davydov's avatar
      test: add improved test for SELECT consistency · 4e9a94a3
      Vladimir Davydov authored
      The idea behind the new test is the same as the one used by
      vinyl/select_consistency.test.lua: create a space with a few
      compound secondary indexes that share the first part, then run
      SELECT requests under heavy write load and check that results
      match. However, in comparison to its predecessor, the new test
      has a few improvements:
      
       1. It generates DML requests in multi-statement transactions.
       2. It checks non-unique indexes.
       3. It checks multikey indexes.
       4. It triggers L0 dumps not by box.snapshot, but by exceeding
          the box.cfg.vinyl_memory limit.
       5. It starts 20 write and 5 read fibers.
       6. It reruns the test after restart to check that recovery works fine.
       7. It checks that there's no phantom statements stored in
          the space indexes after the test.
       8. It runs the test with deferred DELETEs enabled and disabled.
          (see box.cfg.vinyl_defer_deletes).
       9. It is written in luatest.
      
      The test takes about 20 seconds to finish so it's marked as long run.
      
      Closes #4251
      
      NO_DOC=test
      NO_CHANGELOG=test
      4e9a94a3
    • Ilya Verbin's avatar
      box: fix `fselect()` behavior on binary data · 915ccdf1
      Ilya Verbin authored
      Currently it throws an error when encounter binary data, print
      <binary> tag instead.
      
      Closes #7040
      
      NO_DOC=bugfix
      915ccdf1
  11. Jul 04, 2022
    • Serge Petrenko's avatar
      replication: relax split-brain checks after DEMOTE · b5811f15
      Serge Petrenko authored
      Our txn_limbo_is_replica_outdated check works correctly only when there
      is a stream of PROMOTE requests. Only the author of the latest PROMOTE
      is writable and may issue transactions. No matter synchronous or
      asynchronous.
      
      So txn_limbo_is_replica_outdated assumes that everyone but the node with
      the greatest PROMOTE/DEMOTE term is outdated.
      
      This isn't true for DEMOTE requests. There is only one server which
      issues the DEMOTE request, but once it's written, it's fine to accept
      asynchronous transactions from everyone.
      
      Now the check is too strict. Every time there is an asynchronous
      transaction from someone, who isn't the author of the latest PROMOTE or
      DEMOTE, replication is broken with ER_SPLIT_BRAIN.
      
      Let's relax it: when limbo owner is 0, it's fine to accept asynchronous
      transactions from everyone, no matter the term of their latest PROMOTE
      and DEMOTE.
      
      This means that now after a DEMOTE we will miss one case of true
      split-brain: when old leader continues writing data in an obsolete term,
      and the new leader first issues PROMOTE and then DEMOTE.
      
      This is a tradeoff for making async master-master work after DEMOTE.
      
      The completely correct fix would be to write the term the transaction
      was written in with each transaction and replace
      txn_limbo_is_replica_outdated with txn_limbo_is_request_outdated, so
      that we decide whether to filter the request or not judging by the term
      it was applied in, not by the term we seen in some past PROMOTE from the
      node. This fix seems too costy though, given that we only miss one case
      of split-brain at the moment when the user enables master-master
      replication (by writing a DEMOTE). And in master-master there is no such
      thing as a split-brain.
      
      Follow-up #5295
      Closes #7286
      
      NO_DOC=internal chcange
      b5811f15
  12. Jul 01, 2022
    • Yaroslav Lobankov's avatar
      test: fix running 'small' lib tests for OOS build · 28426f67
      Yaroslav Lobankov authored
      The 'small' lib test suite was not run for out-of-source builds since
      the wrong symlink was created for test binaries and test-run couldn't
      find them. Now it is fixed.
      
      When test-run loads tests, first, it searches the suite.ini file and if
      it exists test-run consider the dir as a test suite. So there was sense
      to create a permanent link for 'small' lib tests.
      
      Closes #4485
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      28426f67
    • Vladimir Davydov's avatar
      vinyl: explicitly disable hot standby mode · 008ab8d3
      Vladimir Davydov authored
      Vinyl doesn't support the hot standby mode. There's a ticket to
      implement it, see #2013. The behavior is undefined if running an
      instance in the hot standby mode in case the master has Vinyl spaces.
      It may result in a crash or even data corruption.
      
      Let's raise an explicit error in this case.
      
      Closes #6565
      
      NO_DOC=bug fix
      008ab8d3
    • Vladimir Davydov's avatar
      json: don't match any nodes if there's [*] in the path · 35802a23
      Vladimir Davydov authored
      If a nested tuple field is indexed, it can be accessed by [*] aka
      multikey or any token:
      
        s = box.schema.create_space('test')
        s:create_index('pk')
        s:create_index('sk', {parts = {{2, 'unsigned', path = '[1][1]'}}})
        t = s:replace{1, {{1}}}
        t['[2][1][*]'] -- returns 1!
      
      If a nested field isn't indexed (remove creation of the secondary index
      in the example above), then access by [*] returns nil.
      
      Call graph:
      
        lbox_tuple_field_by_path:
          tuple_field_raw_by_full_path
            tuple_field_raw_by_path
              tuple_format_field_by_path
                json_tree_lookup_entry
                  json_tree_lookup
      
      And json_tree_lookup matches the first node if the key is [*].
      We shouldn't match anything to [*].
      
      Closes #5226
      
      NO_DOC=bug fix
      35802a23
  13. Jun 30, 2022
    • Boris Stepanenko's avatar
      test: box_promote and box_demote · 5a8dca70
      Boris Stepanenko authored
      Covered most of box_promote and box_demote with tests:
      1. Promote/demote unconfigured box
      2. Promoting current leader with elections on and off
      3. Demoting follower with elections on and off
      4. Promoting current leader, but not limbo owner with elections on
      5. Demoting current leader with elections on and off
      6. Simultaneous promote/demote
      7. Promoting voter
      8. Interfering promote/demote while writing new term to wal
      9. Interfering promote/demote while waiting for synchro queue
         to be emptied
      10. Interfering promote while waiting for limbo to be acked
          (similar to replication/gh-5430-qsync-promote-crash.test.lua)
      
      Closes #6033
      
      NO_DOC=testing stuff
      NO_CHANGELOG=testing stuff
      5a8dca70
Loading