Skip to content
Snippets Groups Projects
  1. Oct 28, 2021
  2. Oct 27, 2021
    • Yaroslav Lobankov's avatar
      ci: add integration check for metrics module · 7056061e
      Yaroslav Lobankov authored
      This patch extends the 'integration.yml' workflow and adds a new
      workflow call for running tests to verify integration between tarantool
      and the metrics module.
      
      Part of tarantool/tarantool#5265
      Part of tarantool/tarantool#6056
      Closes tarantool/tarantool#6526
      7056061e
    • Vladimir Davydov's avatar
      box: don't delete inprogress files during normal GC · f9bbfff9
      Vladimir Davydov authored
      *.inprogress files shouldn't be deleted during normal GC, because they
      may be in use. E.g. GC may happen to run while WAL is rotating xlog;
      if GC removes the transient xlog.inprogress file created by WAL (see
      xdir_create_xlog), WAL will fail to rename it and abort the current
      transaction.
      
      Initially, inprogress files were removed only after recovery. For this
      reason, xdir_collect_inprogress, which is used for deleting inprogress
      files, accesses FS directly, without COIO. This was changed by commit
      5aa243de ("recovery: build secondary
      index in hot standby mode") which moved xdir_collect_inprogress from
      memtx_engine_end_recovery to memtx_engine_collect_garbage so that a hot
      standby instance doesn't delete inprogress files of the master instance
      by mistake.
      
      To fix this issue, let's move xdir_collect_inprogress back where it
      belongs, to engine_end_recovery, and introduce a new callback for memtx
      to build its secondary keys before entering the hot standby mode -
      engine_begin_hot_standby.
      
      Let's also remove engine_collect_garbage from gc_init, which was added
      there by the aforementioned commit, probably to make tests pass.
      
      The bug was reported by the vinyl/deferred_delete test (#5089).
      
      Closes #6554
      f9bbfff9
  3. Oct 26, 2021
    • VitaliyaIoffe's avatar
      Migrate quorum.test.lua · c3e231d5
      VitaliyaIoffe authored
      Quorum.test.lua was migrated to luatest.
      It was divided into several tests.
      
      Delete quorum.test.lua, fix suite.ini in replication tests.
      
      Part of tarantool/test-run#304
      c3e231d5
    • VitaliyaIoffe's avatar
      Migrate msgpack.test.lua to luatest · 6e163c17
      VitaliyaIoffe authored
      Use luatest for checking correctness behavioral for encode/decode
      functions
      
      Delete msgpack.test.lua.
      
      Part of tarantool/test-run#304
      6e163c17
    • VitaliyaIoffe's avatar
      Provide helpers for luatest · 61bf2985
      VitaliyaIoffe authored
      The commit includes a few helpers files for luatest infrastructure.
      'Server' based on luatest Server with additional functionality like
      waiting Server for start, create Server's own env including box.cfg
      provided by test.
      
      Servers could be built and added in a cluster (cluster.lua file).
      
      Asserts.lua is additional checks, which are useful for many tests.
      
      Helpers are supportive function, could be also used for many tests.
      
      Part of tarantool/test-run#304
      61bf2985
  4. Oct 25, 2021
    • mechanik20051988's avatar
      iproto: implement timeout for iproto transactions · b9f7204b
      mechanik20051988 authored
      Same as for local transactions, timeout for iproto transactions
      was implemented. If timeout is not specified in client request
      it's sets to box.cfg.txn_timeout, which specified on server side.
      
      Closes #6177
      
      @TarantoolBot document
      Title: ability to set timeout for iproto transactions was implemented
      A new `IPROTO_TIMEOUT 0x56` key has been added. Currently it is used to
      set a timeout for transactions over iproto streams. It is stored in the
      body of 'IPROTO_BEGIN' request. If user want's to specify timeout using
      netbox (3s for example), he should use 'stream:begin({timeout = 3}).
      b9f7204b
    • mechanik20051988's avatar
      txn: implement timeout for transactions · a76eb6ef
      mechanik20051988 authored
      Client code errors or manual mistakes can create transactions that are
      never closed. Such transaction will work as a memory leak. Implement
      timeout for transactions after which they are rolled back.
      
      Part of #6177
      
      @TarantoolBot document
      Title: ability to set timeout for transactions was implemented
      Previously transactions are never closed until commit or rollback.
      Timeout for transactions was implemented after which they are rolled
      back. For these purpose, in `box.begin` the optional table parameter
      was added. For example if user want to start transaction with timeout
      3s, he should use `box.begin({timeout = 3})`. Also was implement new
      configuration option `box.cfg.txn_timeout` which determines timeout for
      transactions, for which the timeout was not explicitly set. By default
      this option is set to infinity (TIMEOUT_INFINITY = 365 * 100 * 86400).
      Also in C API was added new function to set timeout for transaction -
      'box_txn_set_timeout'.
      a76eb6ef
    • mechanik20051988's avatar
      txn: ignore changes after rollback on yield · 9c5d3ed7
      mechanik20051988 authored
      Previously, if a yield occurs for a transaction that does not
      support it, we roll back all its statements, but still process
      its new statements (they will roll back with each yield). Also,
      the transaction will be rolled back when a commit is attempted.
      Now we stop processing any new statements right after first yield,
      if transaction doesn't support it. This is done so that when we
      implement timeout for transactions, the rollback of the transaction
      at its expiration and at yield has the same behavior.
      
      Part of #6177
      9c5d3ed7
    • mechanik20051988's avatar
      txn: rework txn_on_yield trigger · 243c207a
      mechanik20051988 authored
      We are going to implement timeout for transaction, after which it
      will be rolled back. The timeout starts counting from the moment of
      the first yield. Previously `txn_on_yield` trigger installed only
      in case when engine does not support yields for transactions. Now it
      is installed when transaction is created, but if transaction supports
      yields it doesn't do anything. In the following patches, we will use
      this trigger to start the transaction timeout countdown.
      
      Part of #6177
      243c207a
  5. Oct 22, 2021
  6. Oct 21, 2021
    • Yaroslav Lobankov's avatar
      ci: switch to 'ubuntu-20.04-self-hosted' run label · b2108023
      Yaroslav Lobankov authored
      The idea of these changes is to run testing workflows on self-hosted
      ubuntu-20.04 machines instead of GitHub ubuntu-20.04 runners. It is
      planned to use GitHub ubuntu-20.04 runners only for integration testing
      of tarantool with a module/connector where ephemeral environments will
      allow us avoiding various cleanup pains on self-hosted runners like
      
          - if: always()
            run: sudo apt-get -y purge 'tarantool*'
      
      or
      
          - if: always()
            run: rm -rf .rocks
      
      or
      
          - if: always()
            run: rm -rf pytest-venv
      
      Also, switch workflows running on GitHub ubuntu-18.04 runners to
      self-hosted ubuntu-20.04 machines.
      b2108023
    • Georgy Moiseev's avatar
      debian: bump debian/compat to 10 · d3c3031b
      Georgy Moiseev authored
      Bump debian/compat to 10 since 9 is deprecated. Bump minimal required
      debhelper to 10 (except for Ubuntu Trusty and Xenial) since it is the
      recommended practice for compatibility level setup.
      
      Closes #6393
      d3c3031b
    • mechanik20051988's avatar
      test: decrease instance file name length · b1d91509
      mechanik20051988 authored
      The maximal unix socket file length is 108 symbols on Linux, so
      we should decrease file name to fit in this size.
      b1d91509
    • Vladimir Davydov's avatar
      iproto: fix kharon use after free · 2ad64078
      Vladimir Davydov authored
      The session can be closed while kharon is travelling between tx and
      iproto. If this happens, kharon shouldn't go back to iproto when it
      returns to tx, even if there are pending pushes, because the connection
      is going to be freed soon.
      
      Thanks to @Gerold103 for the simple fix.
      
      Closes #6520
      2ad64078
  7. Oct 20, 2021
    • Mergen Imeev's avatar
      sql: do not truncate DECIMAL in LIMIT and OFFSET · c72edb0d
      Mergen Imeev authored
      This patch removes the DECIMAL truncation in LIMIT and OFFSET, because
      according to the implicit casting rules, DECIMAL with digits after the
      decimal point cannot be implicitly cast to INTEGER.
      
      Closes #6485
      c72edb0d
    • Mergen Imeev's avatar
      sql: fix cast of small negative DECIMAL to INTEGER · 7bce8428
      Mergen Imeev authored
      This patch fixes an assertion when casting DECIMAL value less than 0 and
      greater than -1 to INTEGER.
      
      Part of #6485
      7bce8428
    • Mergen Imeev's avatar
      sql: fix truncation of DECIMAL in implicit cast · 18a5ee8e
      Mergen Imeev authored
      In case the DECIMAL value is implicitly cast to INTEGER during a search
      using an index, it was possible that DECIMAL would be truncated, which
      is not correct according to the implicit cast rules. This patch removes
      this truncation.
      
      Part of #6485
      18a5ee8e
    • mechanik20051988's avatar
      iproto: fix tarantool blindness in case of invalid listen uri. · 97be44af
      mechanik20051988 authored
      In case user enters invalid listen address, tarantool closes previous listen
      socket, but bind on invalid address fails also, so tarantool becames blind -
      no listening socket at all. This patch fixed this behaviour, now tarantool
      still listen old listen address.
      
      Closes #6092
      97be44af
    • mechanik20051988's avatar
      iproto: fix crash if box.cfg listen is woken up. · e7a9fd0b
      mechanik20051988 authored
      There was access to previously freed memory in case when `cbus_call`
      is interrupted: `cbus_call_msg` in iproto allocates on stack, and if
      `cbus_call` failed due to fiber cancelation or wake up, `cbus_call_msg`
      memory is released. But function called through cbus is still work in
      iproto thread and there will be an attempt to access this memory when
      this function in iproto thread finished it's work. This patch rework
      this behaviour, now before `cbus_call` we reset FIBER_IS_CANCELLABLE
      flag, to prevent fiber cancellation or it's wake up.
      
      Closes #6480
      e7a9fd0b
  8. Oct 18, 2021
    • Yaroslav Lobankov's avatar
      ci: change permissions in WS for reusable build · 16a484a3
      Yaroslav Lobankov authored
      For self-host runners, where the workspace with sources is saving
      between different workflow runs, it is needed to be sure that all file
      permissions are correct for running user to be sure that later call to
      sources checkout action by the same user won't fail on sources cleanup.
      
      Follows up tarantool/tarantool-qa#102
      16a484a3
Loading