Skip to content
Snippets Groups Projects
  1. Jan 25, 2023
  2. Jan 24, 2023
  3. Jan 23, 2023
  4. Jan 18, 2023
    • Vladimir Davydov's avatar
      static-build: disable symbols renaming for libicu · 465995ff
      Vladimir Davydov authored
      ICU symbol renaming was disabled in EE build by commit
      https://github.com/tarantool/tarantool-ee/commit/f51346d682e3afd93592023d0dedfb1e45167c7a
      ("static-build: disable symbols renaming for libicu"), because EE build
      exports ICU symbols so that they can be used by Lua modules. It isn't
      necessary in CE build, but since we're planning to reuse the CE cmake
      config in the EE repository, we should do that.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/185
      
      NO_DOC=no functional changes
      NO_TEST=no functional changes
      NO_CHANGELOG=no functional changes
      
      (cherry picked from commit 9362f4a8)
      465995ff
    • Vladimir Davydov's avatar
      static-build: make cmake file reusable · 7b6cac40
      Vladimir Davydov authored
      Split it so that it can be reused in the EE repository:
      
       - static-build/cmake/AddDependencyProjects.cmake
         Adds the external projects that are required to build tarantool.
         The project names are stored in the TARANTOOL_DEPENDS variable.
      
       - static-build/cmake/AddTarantoolProject.cmake
         Should be called after AddDependencyProjects.cmake, because it
         uses the TARANTOOL_DEPENDS variable. Adds the Tarantool external
         project and sets the TARANTOOL_BINARY to the path to the built
         tarantool binary.
      
       - static-build/cmake/AddTests.cmake
         Should be called after AddTarantoolProject.cmake, because it uses
         the TARANTOOL_BINARY variable. Adds cmake tests for the static
         binary.
      
      Now, static-build/CMakeLists.txt just includes the three helper files.
      The helper files are designed in such a way that they can be included
      from the EE repository's CMakeLists.txt. We split the original config
      into the three helper files, because in the EE repository, we need to
      add extra dependency projects and extra tests.
      
      While we are at it, we also move the cmake tests from
      static-build/test/static-build to static-build/test and
      static-build/test/CheckDependencies.cmake to
      static-build/cmake/CheckDependencies.cmake.
      
      This commit introduces no functional changes - it just moves the code.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/185
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 520884a9)
      7b6cac40
    • Ilya Verbin's avatar
      cmake: detect changes in source files upon static build · 9b9a0556
      Ilya Verbin authored
      Currently `make` in `static-build` doesn't rebuild Tarantool when source
      files are changed. Fix this by setting BUILD_ALWAYS option, which forces
      rescan for changes of the external project [1]:
      
      > This option is not normally needed unless developers are expected to
      > modify something the external project's build depends on in a way that
      > is not detectable via the step target dependencies (e.g. SOURCE_DIR is
      > used without a download method and developers might modify the sources
      > in SOURCE_DIR).
      
      It is available since CMake 3.1, so update cmake_minimum_required, as we
      already require it (fa8d70ca).
      
      [1] https://cmake.org/cmake/help/latest/module/ExternalProject.html
      
      Part of #7536
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=minor
      
      (cherry picked from commit a1f554bd)
      9b9a0556
  5. Jan 17, 2023
    • Serge Petrenko's avatar
      core: silence libunwind errors · a4533a99
      Serge Petrenko authored
      Every libunwind error during backtrace collection is reported with
      `say_error`. Since commit 19abfd2a ("misc: get rid of fiber_gc")
      backtraces are collected on each fiber gc allocation, of which there are
      plenty.
      
      For some reason (https://github.com/tarantool/tarantool/issues/7980)
      each unw_step fails on mac, and an error is spammed to instance logs,
      even though the backtrace is actually collected.
      
      Silence the errors, since there is no much use for them anyway. And
      silence all of them just to be consistent.
      
      This doesn't close #7980, because that issue still needs a proper fix.
      Although its severity is ameliorated now.
      
      In-scope-of #7980
      
      NO_DOC=bugfix
      NO_CHANGELOG=bugfix
      NO_TEST=nothing to test
      
      (cherry picked from commit c324eedd)
      a4533a99
    • Igor Munkin's avatar
      luajit: bump new version · 85921b17
      Igor Munkin authored
      * ci: use strategy matrix for integration workflow
      * ci: change runner dispatch for LuaJIT testing
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=ci
      85921b17
  6. Jan 16, 2023
    • Vladimir Davydov's avatar
      lua: gracefully fail space on/before replace trigger if txn was aborted · 4de5ef85
      Vladimir Davydov authored
      lbox_push_event_f and lbox_push_event_f callback functions used for
      passing the statement between txn and space on/before replace Lua
      triggers don't assume that the transaction may be aborted by yield
      after the current statement began (this may happen if a trigger callback
      yields). In this case, all statements in txn would be rolled back and
      txn_current_stmt would return NULL, leading to a crash.
      
      Let's fix this by checking if the transaction is still active and
      raising an error immediately if it isn't, thus skipping Lua triggers.
      
      Notes:
       - We merged lbox_pop_txn_stmt_and_check_format into lbox_pop_txn_stmt,
         because the latter is only called by the former.
       - Since lbox_push_event_f callback may now fail, we have to update
         lbox_trigger_run to handle it.
      
      Closes #8027
      
      NO_DOC=bug fix
      
      (cherry picked from commit 1a678a5e)
      4de5ef85
  7. Jan 13, 2023
    • Vladimir Davydov's avatar
      net.box: add info about sequence to remote space object · 016a91f3
      Vladimir Davydov authored
      A remote space object presented by a net.box connection mimics the API
      of a local space object presented by box.space. Currently, it misses
      information about sequences. Let's add it.
      
      Note, we have to handle the case when the recently introduced
      _vspace_sequence system space view is missing on the remote host.
      To check that this works correctly, we reuse the 2.10.4 test data
      created by commit 1c33484d ("box: add auth_history and
      last_modified fields to _user space"). We also add the 'gen.lua'
      that can be used to regenerated the data.
      
      Closes #7858
      
      NO_DOC=bug fix
      
      (cherry picked from commit 457b293c)
      016a91f3
    • Vladimir Davydov's avatar
      schema: create _vspace_sequence system space view · e9262819
      Vladimir Davydov authored
      Note, this patch will be backported to 2.10 so we add upgrade function
      for 2.10.5, not for 2.11.0.
      
      Needed for #7858
      
      @TarantoolBot document
      Title: Document `_space_sequence` and `_vspace_sequence` system spaces
      
      The `_space_sequence` system space was added long time ago (in 1.7.5)
      along with the `_sequence` and `_sequence_data` system spaces, but it
      was never documented. The space is used to attach sequences to spaces
      and has the following fields:
       1. 'id', type 'unsigned'. Space id.
       2. 'sequence_id', type 'unsigned'. Id of the attached sequence.
       3. 'is_generated', type 'boolean'. True if the sequence was created
          automatically (`space:create_index('pk', {sequence = true})`)
       4. 'field', type 'unsigned'. Id of the space field that is set using
          the attached sequence.
       5. 'path', type 'string'. Path to the data within the field that is set
          using the attached sequence.
      
      The `_vspace_sequence` is a system space view of the `_space_sequence`
      space that, like any other system space view, shows only rows accessible
      by the current user. It will be introduced in Tarantool 2.10.5.
      
      (cherry picked from commit 06ee1134)
      e9262819
    • Aleksandr Lyapunov's avatar
      txm: carefully handle conflict · 8b05755f
      Aleksandr Lyapunov authored
      When a transaction is in read-confirmed state it must ignore all
      prepared changes, and if it actually ignores something - it must
      fall to read-view state.
      
      By a mistake the check relied not on actual skipping of a prepared
      statement, but on the fact that there is a deleting statement. That
      leads to excess conflicts for transactions with read-committed
      isolation level.
      
      Fix it by raising a conflict only if a deleting statement is skipped.
      
      Closes #8122
      Needed for #7202
      
      NO_DOC=bugfix
      
      (cherry picked from commit 91d6d70f)
      8b05755f
    • Aleksandr Lyapunov's avatar
      txm: free read lists of a transaction when it's prepared · 41dc8812
      Aleksandr Lyapunov authored
      Read lists (read set and other similar lists) are used only for
      detecting a conflict when another transaction is committed.
      Once a transaction is prepared (no matter with success or not)
      those lists are no more needed. Moreover, in some part of code it
      is expected that there can be no read set of already prepared tx.
      
      So let's clean those lists once a transaction is prepared.
      
      Closes #7945
      
      NO_DOC=bugfix
      
      (cherry picked from commit ba8e00c0)
      41dc8812
    • Aleksandr Lyapunov's avatar
      memtx: simplify check_dup function · 3d3ef804
      Aleksandr Lyapunov authored
      There ware two functions - check_dup_clean and check_dup_dirty.
      Merge them to one.
      
      Also extract phantom checks from check_dup and call them explicitly.
      That will additionally simplify check_dup and will allow to get rid
      of temporary conflict trackers - memtx_tx_conflict. Note that this
      kind of object will remain in memory monitoring by now. It will be
      removed later.
      
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit a5dd48ed)
      3d3ef804
    • Aleksandr Lyapunov's avatar
      memtx: don't set unnecessary conflict · d38daeda
      Aleksandr Lyapunov authored
      If a transaction writes to a gap that is tracked by some another
      transaction, the interval must be (usually) broken into parts,
      while new story must be explicitly added to the read set of
      reading transaction.
      
      Now both read tracker and conflict trackers are set in this case.
      But read tracker is enough in this case - when the writing tx
      is prepared it will conflict reading transaction, that's all we
      need.
      
      Let's leave only read tracker.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit e6f5090c)
      d38daeda
    • Aleksandr Lyapunov's avatar
      memtx: split and simplify memtx_tx_story_is_visible · 389f8ddc
      Aleksandr Lyapunov authored
      Each story has two ends: the beginning and the end. For each
      transaction both ends of a story could be visible or not.
      
      Now there's a function that checks visibility of both ends of
      a story. It can distinguish three cases: both ends are visible,
      both ends are invisible, and the beginning is visible while the
      end is not. The function returns true in the first and the last
      cases; the actual case is clarified with an additional function
      argument - visible_tuple, which is set to null in one of the
      cases..
      
      Let's make two different functions for checking visibility of
      the beginning and the end of a story. Actually that is simple
      split of function into two parts. The visible_tuple argument
      will no longer be needed.
      
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit b6ef41ef)
      389f8ddc
    • Aleksandr Lyapunov's avatar
      memtx: don't track read of own change · 61c555f0
      Aleksandr Lyapunov authored
      There's no harm but also no sense in it.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 8a565144)
      61c555f0
    • Aleksandr Lyapunov's avatar
      memtx: move memtx_tx logic to memtx_tx.c · ec2e5b96
      Aleksandr Lyapunov authored
      Hide structures and functions that are not required for API.
      
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 4cc04ca9)
      ec2e5b96
    • Aleksandr Lyapunov's avatar
      memtx: always check for memtx_tx_manager_use_mvcc_engine flag · aecdc06c
      Aleksandr Lyapunov authored
      Option memtx_tx_manager_use_mvcc_engine changes the behavior of
      transaction execution workflow. Usually that is implemented as
      direct check of memtx_tx_manager_use_mvcc_engine. But there are
      places in the code that rely on the fact that some pointers are
      set to not null if the engine is enabled. That's a bit confusing.
      
      Let's always check for memtx_tx_manager_use_mvcc_engine option
      when it's needed to determine which workflow must be executed.
      
      Note that checking of memtx_tx_manager_use_mvcc_engine option is
      more correct: in case of delete of nothing (delete statement when
      a tuple was not found by given key) all the pointers including
      old_tuple and new_tuple are null, while logically we still need
      to use mvcc execution workflow. Note also that in this case the
      mvcc engine does (and must do) almost nothing, so there was no
      bug in the previous behaviour.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit f4c56892)
      aecdc06c
    • Aleksandr Lyapunov's avatar
      memtx: fix comments and function names · 9560cf80
      Aleksandr Lyapunov authored
      No logical changes.
      
      Part of #8122
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 69479c89)
      9560cf80
  8. Jan 12, 2023
    • Georgiy Lebedev's avatar
      coro: fix dereferencing of `void *` pointer warning · 14375bbf
      Georgiy Lebedev authored
      Since the fiber function is not expected to return (i.e., the inline
      assembly is not expected to return), remove the dummy memory operand used
      to indicate that the memory pointed to by the inline assembly pointer
      operand is clobbered.
      
      Closes #8125
      
      NO_DOC=build diagnostic
      NO_CHANGELOG=build diagnostic
      NO_TEST=build diagnostic
      
      (cherry picked from commit 97a3af1b)
      14375bbf
    • Vladimir Davydov's avatar
      txn: drop TXN_CONFLICTED transaction status · 815455c7
      Vladimir Davydov authored
      The status isn't used anywhere - to set the proper error when an aborted
      transaction is attempted to be used, we check out transaction flags
      (TXN_IS_CONFLICTED, TXN_IS_ABORTED_BY_YIELD, TXN_IS_ABORTED_BY_TIMEOUT).
      Let's use TXN_ABORTED instead.
      
      While we are at it, also set the transaction status to TXN_ABORTED when
      a transaction is aborted by yield or timeout and use it instead of
      checking flags where appropriate, since it's more convenient.
      
      Follow-up #8123
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      
      (cherry picked from commit 16f8969f)
      815455c7
    • Vladimir Davydov's avatar
      txn: fail ro stmt if transaction is aborted · 23f4e6f6
      Vladimir Davydov authored
      We fail write statements if the current transaction was aborted by yield
      or timeout. We should fail read-only statements in this case, as well.
      Note, we already fail read-only statements if the current transaction
      was aborted by conflict.
      
      Closes #8123
      
      NO_DOC=bug fix
      
      (cherry picked from commit 5f1500f4)
      23f4e6f6
    • Alexander Turenko's avatar
      build: fix build fail on clang 15 · 26721cbb
      Alexander Turenko authored
      Fixed pthread-related CMake checks. The checks code is built with
      `-pedantic-errors` and it leads to errors of the following kind on
      clang 15:
      
      ```
      <...>/CMakeFiles/CMakeScratch/TryCompile-78KaOK/src.c:4:17: error: a
          function declaration without a prototype is deprecated in all
          versions of C [-Werror,-Wstrict-prototypes]
              int main() { pthread_setname_np(pthread_self(), ""); }
                      ^
                       void
      ```
      
      Fixed a warning in the SQL code (it's an error in Debug build):
      
      ```
      <...>/src/box/sql/vdbeaux.c:170:13: error: variable 'n' set but not used
          [-Werror,-Wunused-but-set-variable]
              static int n = 0;
      ```
      
      Fixed several warnings from lemon.c of the following kind:
      
      ```
      <...>/extra/lemon.c:173:6: warning: a function declaration without a
          prototype is deprecated in all versions of C and is treated as a
          zero-parameter prototype in C2x, conflicting with a subsequent
          definition [-Wdeprecated-non-prototype]
      void FindRulePrecedences();
           ^
      <...>/extra/lemon.c:766:6: note: conflicting prototype is here
      void FindRulePrecedences(struct lemon *xp)
      ```
      
      See also https://github.com/tarantool/small/issues/57
      
      Fixes #8110
      
      NO_DOC=build fix
      NO_TEST=build fix
      
      (cherry picked from commit 1c6b6f85)
      Unverified
      26721cbb
    • Alexander Turenko's avatar
      small: eliminate unused variable warn on clang 15 · 17a5df4b
      Alexander Turenko authored
      Bump the small submodule with the following commit:
      
      * https://github.com/tarantool/small/commit/02d3c23fd0d1e1743618850dc11378566b3804b1
        - It eliminates a CMake warning.
      * https://github.com/tarantool/small/commit/c1ac3eef79a7394fb52442a77b958b66d82b8f0b
        - It adds on alloc/on truncate callbacks and poisoning of freed data.
          Tarantool 2.10 doesn't set the callbacks, so no behavior should
          change.
      * https://github.com/tarantool/small/commit/5c3a0880ae4659cb662085563ff0b9eee40565fe
        - It eliminates the warning on clang 15.
      
      See https://github.com/tarantool/small/issues/57
      Part of #8110
      
      It is a backport of PR #8142 for 2.10.
      
      NO_DOC=build fix
      NO_TEST=build fix
      NO_CHANGELOG=to be added in a commit that fixes #8110
      17a5df4b
  9. Jan 11, 2023
    • Igor Munkin's avatar
      luajit: bump new version · 8e58452f
      Igor Munkin authored
      * cmake: introduce CheckUnwindTables helper
      * x64/LJ_GC64: Fix type-check-only variant of SLOAD.
      * LJ_GC64: Fix ir_khash for non-string GCobj.
      * gdb: support full-range 64-bit lightuserdata
      
      Relates to #6481
      Part of #7230
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      8e58452f
  10. Jan 10, 2023
  11. Dec 29, 2022
    • Yaroslav Lobankov's avatar
      ci: fix pull_request trigger for coverage workflow · 630c79a0
      Yaroslav Lobankov authored
      The coverage workflow is a part of the default testing, so there is no
      sense to run this workflow when the 'full-ci' label is set. Moreover, it
      cancelled the run of the default testing and started the run of the full
      testing due to workflow `concurrency`.
      
      By default, a workflow only runs when a `pull_request` event's activity
      type is `opened`, `synchronize`, or `reopened`. That's why there is no
      sense in the following construction:
      
        pull_request:
          types: [ opened, reopened, synchronize ]
      
      So just removed the line related to event's activity type.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit 182034dc)
      Unverified
      630c79a0
    • viacheslav.kirichenko's avatar
      ci: add integration testing for ddl and crud · da461cd3
      viacheslav.kirichenko authored
      Add workflow for integration testing of ddl
      and crud modules.
      
      Resolves tarantool/tarantool#6619
      Resolves tarantool/tarantool#6620
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit 53f41130)
      da461cd3
  12. Dec 25, 2022
    • Alexander Turenko's avatar
      test: stabilize jit.dump() smoke test · d4f6e796
      Alexander Turenko authored
      
      A jiggle in tarantool's initialization code can lead to trace numbers
      above 9. We can either:
      
      * accept trace numbers above 9 in the test
      * or drop traces from the initialization code in the test and assume
        that the new trace will have number 1.
      
      Igor Munkin suggested to stick with the second approach to avoid
      dependency on the initialization code.
      
      NO_DOC=test fixup, no user visible changes
      NO_CHANGELOG=see NO_DOC
      
      Co-authored-by: default avatarIgor Munkin <imun@tarantool.org>
      (cherry picked from commit 92794ddc)
      Unverified
      d4f6e796
  13. Dec 23, 2022
    • Ilya Verbin's avatar
      core: unblock fatal (crashing) signals in all threads · 1c176245
      Ilya Verbin authored
      Currently all non-main threads have all the signals blocked, however
      according to `man pthread_sigmask':
      
      > If SIGBUS, SIGFPE, SIGILL, or SIGSEGV are generated while they
      > are blocked, the result is undefined, unless the signal was
      > generated by kill(2), sigqueue(3), or raise(3).
      
      On macOS they are actually blocked, causing the faulting instruction
      to loop indefinitely. While on Linux they are not blocked, however the
      signal handler registered by sigaction is not executed. Don't block them.
      
      Closes #8023
      Closes #8083
      
      NO_DOC=bugfix
      
      (cherry picked from commit 706bfea4)
      1c176245
    • Ilya Verbin's avatar
      crash: handle all unblockable signals · 6290b041
      Ilya Verbin authored
      There are 4 fatal signals that cannot be blocked by sigmask if they
      are caused by the CPU exception (rather than kill, sigqueue or raise):
      SIGILL, SIGBUS, SIGFPE, SIGSEGV. Currently the crash module handles
      only SIGSEGV and SIGFPE. This patch adds handlers for SIGBUS and SIGILL.
      SIGBUS is usually raised by macOS on access to the unmapped memory, and
      SIGILL is possible, for example, while running AVX version of memcpy on
      a CPU without AVX support.
      
      Faulting address siginfo->si_addr is valid for all these signals, so
      print it unconditionally.
      
      Part of #8023
      Part of #8083
      
      NO_DOC=See next commit
      NO_CHANGELOG=See next commit
      
      (cherry picked from commit 6c3ce7a6)
      6290b041
    • Andrey Saranchin's avatar
      core: drop constraints in two phases · 535decdf
      Andrey Saranchin authored
      Currently, core constraints are dropped on commit. That is why
      it is impossible to drop constraint and drop objects it references to
      at the same transaction. Let's drop constraints in two steps - detach
      them when DDL occurs, then reattach on rollback or delete on commit.
      
      Closes #7339
      
      NO_DOC=bugfix
      
      (cherry picked from commit f72efbc2)
      535decdf
  14. Dec 21, 2022
    • Ilya Verbin's avatar
      box: do not close xlog file descriptors in the atfork handler · ea4c2567
      Ilya Verbin authored
      Use O_CLOEXEC flag instead.
      
      If Tarantool is forked before executing box.cfg{}, e.g. using io.popen(),
      the child process could start with stdin linked to /dev/urandom.
      This happens because wal_writer_singleton and vy_log_writer are not yet
      initialized, i.e. `fd' fields are 0, then atfork child handler wal_atfork()
      is called. It checks that xlog is opened (the check succeeded as 0 != -1)
      and closes its fd 0, in fact closing stdin (twice). Next, Tarantool opens
      the file /dev/urandom during initialization, and it receives the lowest
      unused file descriptor, which is 0. Then luaL_loadfile() loads stdin as a
      Lua chunk, in effect reading random numbers.
      
      This happens on glibc 2.28 and older, as newer versions do not invoke
      atfork handlers during io.popen():
      https://sourceware.org/bugzilla/show_bug.cgi?id=17490
      
      Closes #7886
      
      NO_DOC=bugfix
      NO_TEST=Tested by test/app-luatest/gh_5747_crash_multiple_args_test.lua
      
      (cherry picked from commit ec1af129)
      ea4c2567
Loading