Skip to content
Snippets Groups Projects
  1. Nov 03, 2020
    • Vladislav Shpilevoy's avatar
      txn: rename txn_complete_async to txn_on_journal_write · a512cb8a
      Vladislav Shpilevoy authored
      The function is called only by the journal when write is finished.
      
      Besides, it may not complete the transaction. In case of
      synchronous replication it is not enough for completion. It means,
      it can't have 'complete' in its name.
      
      Also the function is never used out of txn.c, so it is removed
      from txn.h and is now static.
      
      The patch is a preparation for not spaming "too long WAL write" on
      synchronous transactions, because it is simply misleading.
      
      Part of #5139
      a512cb8a
  2. Nov 02, 2020
  3. Nov 01, 2020
    • Alexander V. Tikhonov's avatar
      test: fix hanging of vinyl/gh.test.lua · 42c64d06
      Alexander V. Tikhonov authored
      Found that the previously fixed vinyl/gh.test.lua test in commit:
      
        94dc5bdd ('test: gh test hangs after gh-4957-too-many-upserts')
      
      with adding fiber.sleep(1) workaround to avoid of raise from the
      previously run vinyl/gh-4957-too-many-upserts.test.lua test can be
      changed in the other way. The new change from one side will leave
      the found issue untouched to be able to resolve it within opened
      issue in github. And from the other side it will let the test-run
      tool to be able to avoid of this issue using fragile list feature
      to save the stability of testing due to found issue is flaky and
      can be passed on reruns.
      
      The current fix changes the forever waiting loop to especially
      created for such situations test_run:wait_cond() routine which has
      timeout in it to avoid of hanging the test till global timeout will
      occure. It will let the testing to be continued even after the fail.
      
      Needed for #5141
      42c64d06
    • Alexander V. Tikhonov's avatar
      test: fix flaky vinyl/gh-4957-too-many-upserts · 5c09e52b
      Alexander V. Tikhonov authored
      Added restart the current server to resolve the issue #5141 which
      reproduced in test:
      
        vinyl/gh-5141-invalid-vylog-file.test.lua
      
      Added test-run filter on box.snapshot error message:
      
        'Invalid VYLOG file: Slice [0-9]+ deleted but not registered'
      
      to avoid of printing changing data in results file to be able to use
      its checksums in fragile list of test-run to rerun it as flaky issue.
      
      Part of #5141
      5c09e52b
    • Alexander V. Tikhonov's avatar
      test: create reproducer for #5141 · 0e6a61ac
      Alexander V. Tikhonov authored
      Created the stable reproducer for the issue #5141:
      
        box.snapshot()
        ---
       -- ok
       +- error: 'Invalid VYLOG file: Slice <NUM> deleted but not registered'
        ...
      
      flaky occured in vinyl/ suite tests if running after the test:
      
        vinyl/gh-4957-too-many-upserts.test.lua
      
      as new standalone test:
      
        vinyl/gh-5141-invalid-vylog-file.test.lua
      
      based on test:
      
        vinyl/gh-4957-too-many-upserts.test.lua
      
      Due to issue not reproduced on FreeBSD 12, then test was blocked with:
      
        vinyl/gh-5141-invalid-vylog-file.skipcond
      
      Needed for #5141
      0e6a61ac
    • Alexander V. Tikhonov's avatar
      test: add test filter for box.snapshot · 5ad18786
      Alexander V. Tikhonov authored
      Added test-run filter on box.snapshot error message:
      
        'Invalid VYLOG file: Slice [0-9]+ deleted but not registered'
      
      to avoid of printing changing data in results file to be able to use
      its checksums in fragile list of test-run to rerun it as flaky issue.
      Also added checksums to fragile list for the following tests:
      
        vinyl/iterator.test.lua                       gh-5141
        vinyl/snapshot.test.lua                       gh-4984
      
      Needed for #5141
      Needed for #4984
      5ad18786
    • Alexander V. Tikhonov's avatar
      gitlab-ci: test default gcc on CentOS 7 · 12453d51
      Alexander V. Tikhonov authored
      Sometimes it is convenient to use default compiler on CentOS 7.
      Added test job which uses for compiling default compiler files:
      
        CC=/usr/bin/gcc
        CXX=/usr/bin/g++
      
      Closes #4941
      12453d51
    • Alexander V. Tikhonov's avatar
      build: add Werror flag on packages builds · 07360d03
      Alexander V. Tikhonov authored
      Added ENABLE_WERROR flag to build options to enable Werror.
      
      Part of #4941
      07360d03
    • Alexander V. Tikhonov's avatar
      build: fix Werror warning in test/unit:fiber*.c* · 6b3ed663
      Alexander V. Tikhonov authored
      Building with gcc-4.8.5 on CentOS 7 found issue:
      
      cd /source/build/usr/src/debug/tarantool-2.6.0.144/test/unit && /usr/bin/g++ ... -Wp,-D_FORTIFY_SOURCE=2 ... -O2 ... -O0 -o CMakeFiles/fiber.test.dir/fiber.cc.o -c /source/build/usr/src/debug/tarantool-2.6.0.144/test/unit/fiber.cc
      In file included from /usr/include/inttypes.h:25:0,
                       from /source/build/usr/src/debug/tarantool-2.6.0.144/src/lib/small/small/region.h:34,
                       from /source/build/usr/src/debug/tarantool-2.6.0.144/src/lib/core/memory.h:33,
                       from /source/build/usr/src/debug/tarantool-2.6.0.144/test/unit/fiber.cc:1:
      /usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
       # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      
      It happened because _FORTIFY_SOURCE=2 flag needed -O[1|2] optimization,
      but latest set in command was -O0. To fix it removed not needed '-O0'
      optimization from test/unit/CmakeLists.txt file. This optimization
      became unneeded after the commit:
      
        aa78a941 ("test/uint: fiber")
      
      when the test was completely rewritten.
      
      Needed for #4941
      6b3ed663
  4. Oct 30, 2020
    • Alexander Turenko's avatar
      test: update test-run · 8a0d45f2
      Alexander Turenko authored
      Store *.reject files in ${BUILD}/test/var/rejects/<...>/ instead of
      ${SOURCE}/test/<...>/.
      
      The past approach leads to problems with testing, when the out of source
      build is used and sources are on a read-only filesystem. The main
      problem is when a test fails, but it is marked as fragile and should be
      run again. The test fail assumes storing of the .reject file and the
      testing fails on attempt to write to the read-only filesystem. The
      re-run is not performed so.
      
      Side effect for the in-source build: since the test/var/ directory is
      gitignored, the *.reject files will not shown in `git status` output
      anymore.
      
      https://github.com/tarantool/test-run/pull/209
      
      Follows up #4874
      8a0d45f2
    • Mary Feofanova's avatar
      box/memtx: support bitset indexes for binary fields · 14bf2fdd
      Mary Feofanova authored
      Closes #5071
      
      @TarantoolBot document
      Title: memtx: varbinary supported in bitset indexes
      Now it is possible to create bitset indexes on the fields of varbinary type,
      e.g.: s:create_index('b', {type = 'bitset', parts = {1, "varbinary"}})
      14bf2fdd
    • Kirill Yukhin's avatar
      luajit: bump new version · d3b1c481
      Kirill Yukhin authored
      * test: fix warnings spotted by luacheck
      d3b1c481
    • Mary Feofanova's avatar
      box/lua: new way to define index parts · 42374a16
      Mary Feofanova authored
      Previously accepted formats of index parts:
      parts = {field1, type1, field2, type2}, or
      parts = {{field1, type1, ...}, {field2, type2, ...}}
      
      Now it is allowed to write without extra brace if there is one part only:
      parts = {field1, type1, ...}
      
      Closes #2866
      42374a16
    • Sergey Bronnikov's avatar
      gitlab-ci: enhance jobs with jepsen tests · 4ab0ddcc
      Sergey Bronnikov authored
      To run Jepsen tests in different configurations we need to parametrize run
      script by options, so lein options and number of nodes passed with environment
      variables. By default script runs testing with Tarantool built from latest
      commit.
      
      Added these configurations:
      
      - single instance
      - single instance with enabled TXM
      - cluster with enabled Raft
      - cluster with enabled Raft and TXM
      
      Closes #5437
      4ab0ddcc
  5. Oct 29, 2020
  6. Oct 23, 2020
  7. Oct 22, 2020
    • Aleksandr Lyapunov's avatar
      memtx: fix a bug in unlinking story lists · 2699549f
      Aleksandr Lyapunov authored
      Tx stories must be linked into correct double-linked list.
      Preserve it.
      
      Part of #5423
    • Aleksandr Lyapunov's avatar
      memtx: fix a bug in TX that caused deletion of a durty tuple · b610758b
      Aleksandr Lyapunov authored
      There was a mess in tuple refernce in TX history.
      Now it was remade in the following asumptions:
       * a clean tuple belongs to space, and the space implicitly holds
      a reference to the tuple.
       * a dirty tuple belongs to TX manager and a reference is held
      in the corresponding story.
      
      Closes #5423
      b610758b
    • Serge Petrenko's avatar
      raft: fix an assertion failure on transition to voter · d4de0ed1
      Serge Petrenko authored
      When an instance is configured as candidate, it has a leader death timer
      ticking constantly to schedule an election as soon as leader disappears.
      When the instance receives the leader's heartbeat, it resets the timer
      to its initial value.
      
      When being a voter, the instance ignores heartbeats, since it has
      nothing to wait for. So its timer must be stopped. Otherwise it'll try
      to schedule a new election and fail.
      
      Stop the timer on transition from candidate to voter.
      d4de0ed1
    • Vladislav Shpilevoy's avatar
      raft: don't drop GC when restart relay recovery · e5009dc4
      Vladislav Shpilevoy authored
      When a node becomes a leader, it restarts relay recovery cursors
      to re-send all the data since the last acked row.
      
      But during recovery restart the relay lost the trigger, which used
      to update GC state in TX thread.
      
      The patch preserves the trigger.
      
      Follow up for #5433
      e5009dc4
    • Vladislav Shpilevoy's avatar
      raft: use local LSN in relay recovery restart · a0a60102
      Vladislav Shpilevoy authored
      When a Raft node is elected as a leader, it should resend all its
      data to the followers from the last acked vclock. Because while
      the node was not a leader, the other instances ignored all the
      changes from it.
      
      The resending is done via restart of the recovery cursor in the
      relay thread. When the cursor was restarted, it used the last
      acked vclock to find the needed xlog file. But it didn't set the
      local LSN component, which was 0 (replicas don't send it).
      
      When in reality the component was not zero, the recovery cursor
      still tried to find the oldest xlog file having the first local
      row. And it couldn't. The first created local row may be gone long
      time ago.
      
      The patch makes the restart keep the local LSN component
      unchanged, as it was used by the previous recovery cursor, before
      the restart.
      
      Closes #5433
      a0a60102
    • Alexander V. Tikhonov's avatar
      test: added new checksums for flaky tests · c596d313
      Alexander V. Tikhonov authored
        box/net.box_incorrect_iterator_gh-841.test.lua	gh-5434
        replication/election_basic.test.lua			gh-5368
        replication/election_qsync.test.lua			gh-5430
        replication/election_qsync_stress.test.lua		gh-5395
        replication/gh-4402-info-errno.test.lua		gh-5366
        replication/gh-5426-election-on-off.test.lua		gh-5433
        wal_off/snapshot_stress.test.lua			gh-5431
      c596d313
    • Alexander V. Tikhonov's avatar
      test: skip election_qsync_stress test on FreeBSD12 · 7ab5183b
      Alexander V. Tikhonov authored
      Test replication/election_qsync_stress.test.lua flaky fails and even
      often on FreeBSD 12. It has stable reproducer shown in the issue. To
      stabilize the gitlab testing blocked this test from running on
      FreeBSD 12 with skip condition file till it will be fixed.
      
      Part of #5395
      7ab5183b
    • Sergey Kaplun's avatar
      lua: add missing LuaJIT export symbols · c3a8343c
      Sergey Kaplun authored
      Since LuaJIT provides public C API symbols that are used in the final
      executable, the linker may not just throw it away.
      Nevertheless for future compatibility all symbols from LuaJIT public API
      should be added to exports.h file.
      
      Follows up #5187
      c3a8343c
    • Sergey Kaplun's avatar
      build: provide missing LuaJIT lmisclib.h header · 08bde945
      Sergey Kaplun authored
      Since LuaJIT provides extended LuaC API introduced in the scope of
      5a61e1ab54b5c66bfebd836db1ac47996611e065 ('misc: add C and Lua API for
      platform metrics') corresponding header should be provided along with
      other Tarantool development files.
      
      Follows up #5187
      08bde945
  8. Oct 21, 2020
  9. Oct 20, 2020
    • Nikita Pettik's avatar
      vinyl: reorganize vinyl/upsert_upgrade.test.lua · fa30f9c6
      Nikita Pettik authored
      To make vinyl/upgrade tests hierarchy clean and follow more extendible
      folder structure (like in xlog/upgrade), let's a bit reorganize upgrade
      test.
      
      Follow-up #5107
      fa30f9c6
    • Nikita Pettik's avatar
      vinyl: remove vinyl/upgrade.test.lua · e7511be5
      Nikita Pettik authored
      It was disabled since 9cf66ac0
      Let's remove it to avoid test contamination folder.
      e7511be5
    • Kirill Yukhin's avatar
      sql: enable ephemeral index optimization · 32d54fbb
      Kirill Yukhin authored
      
      This patch enables "ephemeral index" optimization (which is called
      Automatic Indexes in the original SQLite implementation). The main idea
      behind the optimization is to create temporary (ephemeral) space that lasts
      only the duration of single SQL statement. Such space stores intermediate
      execution results. Since in Tarantool index can't exist without space
      (in contrast to SQLite) we call this optimization "ephemeral index".
      It may turn out beneficial due to the fact that cost of creating and
      filling space with single index is (NlogN). So if we lookup data more
      than logN times during the query execution, ephemeral index may give as
      better timings (space full-scan is still O(N)).
      
      As a rule "ephemeral index" space relates to one of spaces used in query
      and contains all or fewer fields than the original space. The order of
      fields in ephemeral space may be different from order in the original space.
      In addition to the mentioned fields, ephemeral index has a rowid -
      additional unsigned field with non-decreasing values which allows to
      store not unique values.
      Example:
      
      CREATE TABLE t1 (i INT PRIMARY KEY, a INT, b INT, c INT);
      CREATE TABLE t2 (i INT PRIMARY KEY, a INT, b INT, c INT);
      ...
      SELECT t1.a, t2.b FROM t1, t2 WHERE t1.b = t2.c
      
      In case the planner decides to use an ephemeral index and chooses t1 as
      the source space, an ephemeral index with three fields will be created
      and will contain the values from t1.b, t1.a, and rowid in that order.
      If t2 is chosen as the source space, an ephemeral index will contain the
      values from t2.c, t2.b, and rowid.
      
      This optimization can also be applied to store results of subquery
      evaluation.
      
      Closes #4933
      
      Co-authored-by: default avatarMergen Imeev <imeevma@gmail.com>
      Co-authored-by: default avatarTimur Safin <tsafin@tarantool.org>
      Reviewed-by: default avatarNikita Pettik <korablev@tarantool.org>
      32d54fbb
  10. Oct 17, 2020
    • Alexander V. Tikhonov's avatar
      test: gh test hangs after gh-4957-too-many-upserts · 94dc5bdd
      Alexander V. Tikhonov authored
      Found that if the previos test like gh-4957-too-many-upserts.test.lua
      leaves some garbage on the current Tarantool server, then the next
      running gh.test.lua test hangs. To resolve it decided to use workaround
      and to set delay before the test start with fiber.sleep(1) to be able
      to get out of one loop iteration.
      
      Closes #5141
      94dc5bdd
    • Timur Safin's avatar
      module api: fix asan failures in test · 0c40bd0a
      Timur Safin authored
      Adding forgotten resource cleanup to the
      `test_tuple_validate_formatted` test, to make ASAN
      happy again.
      
      Closes #5432
      Relates to #5384
      0c40bd0a
  11. Oct 16, 2020
Loading