Skip to content
Snippets Groups Projects
  1. Mar 18, 2022
    • Georgiy Lebedev's avatar
      libunwind: add new submodule · 7dc9fe44
      Georgiy Lebedev authored
      Investigation of GNU libunwind problems on the aarch64-linux-gnu
      platform drive us to the conclusion that libunwind-1.2.1 provided by
      major distribution packages is broken. Not to mention that its test
      suite fails with SEGFAULTs.
      
      Last but not least, some distributions, e.g. CentOS 8 (see #4611) do
      not provide a libunwind package.
      
      Hence, bundle libunwind: bundling is enabled by default on all
      platforms, except for macOS — a system package can be used if its
      version is greater or equal than 1.3.0 (minimal version that does not
      seem to be broken on aarch64-linux-gnu).
      
      * Add new submodule: bump it to current master.
      * Refactor libunwind package search logic out of compiler.cmake.
      * Add CMake script for building bundled libunwind.
      * Add CMake script for extracting version of libunwind.
      * Re-enable backtrace for all RHEL distributions by default.
      * Remove libunwind from static build.
      
      Needed for #4002
      Closes #4611
      
      NO_DOC=build system
      NO_TEST=build system
      7dc9fe44
    • Yaroslav Lobankov's avatar
      ci: use 'concurrency' feature in fuzzing.yml · dbaf03dc
      Yaroslav Lobankov authored
      It looks like we just missed the fuzzing.yml workflow when worked on
      adding this feature to our CI process in #6446.
      
      Follows up tarantool/tarantool-qa#100
      
      NO_DOC=ci
      NO_CHANGELOG=ci
      NO_TEST=ci
      dbaf03dc
    • Yaroslav Lobankov's avatar
      ci: remove unused 'repository_dispatch' trigger · 88b46b4c
      Yaroslav Lobankov authored
      It looks like this trigger was added beforehand for some purposes
      but never used. So there is no sense to keep it in our workflows.
      
      NO_DOC=ci
      NO_CHANGELOG=ci
      NO_TEST=ci
      88b46b4c
    • Yaroslav Lobankov's avatar
      ci: remove logic for 'full-ci' branch suffix · 1a0b5764
      Yaroslav Lobankov authored
      We have recently moved all development from local branches to forks and
      disabled running workflows in forks. So there is no sense to keep logic
      for running full testing in forks if a branch has the 'full-ci' suffix.
      
      NO_DOC=ci
      NO_CHANGELOG=ci
      NO_TEST=ci
      1a0b5764
    • Yaroslav Lobankov's avatar
      ci: not run workflows in forks · c27e6c74
      Yaroslav Lobankov authored
      We have recently moved all development from local branches to forks.
      Most workflows cannot be run in forks because many of them need access
      to private runners and/or secrets.
      
      Workflows in forks can be disabled manually, but it's hard to remember
      and it needs an extra action from a developer. Instead, we can detect
      the repo in workflows and run them if the repo is tarantool/tarantool.
      
      Closes #6913
      
      NO_DOC=ci
      NO_CHANGELOG=ci
      NO_TEST=ci
      c27e6c74
    • AnastasMIPT's avatar
      log: move info messages to info logging level · 1ab3c9d5
      AnastasMIPT authored
      Information messages have been moved from the critical logging level
      to info to avoid false alarms when reading logs.
      
      NO_DOC=commit does not add any new visible functionality
      
      NO_TEST=testing will require more resources than the result it will bring
      1ab3c9d5
    • Sergey Ostanevich's avatar
      netbox: support autocomplete in stream and future · d331b283
      Sergey Ostanevich authored
      Added support to netbox's `stream` and `future` objects using the
      __autocomplete metamethod.
      
      Closes #6305
      NO_DOC=internal
      d331b283
    • Sergey Ostanevich's avatar
      console: introduce __autocomplete metamethod · 7817fc13
      Sergey Ostanevich authored
      This patch updates the logic in lua_rl_complete() where __index from
      a metatable apparently expected to be a table, not a function. It is
      rather simple for a table object, but some of them are userdata, so
      an __autocomplete method is introduced to be sure it returns a table
      with all names suitable for tabcompletion.
      
      Part of #6305
      NO_DOC=internal
      NO_CHANGELOG=part of a fix
      7817fc13
  2. Mar 17, 2022
    • Vladimir Davydov's avatar
      vinyl: disable deferred deletes by default · b9f6d385
      Vladimir Davydov authored
      When the deferred DELETE optimization was introduced, it was enabled for
      all Vinyl spaces. Though the optimization  should improve write
      performance, at the same time it may result in significant degradation
      of reads. Let's disable this optimization by default and add a space
      option to enable it.
      
      Closes #4501
      
      @TarantoolBot document
      Title: Document defer_deletes space option
      
      The new option is a boolean flag that only makes sense for Vinyl spaces
      that have secondary indexes. Setting the flag results in deferring
      generation of DELETE statements for secondary indexes till compaction of
      the primary index. It should speed up writes, because it eliminates a
      lookup in the space for REPLACE and DELETE operations. At the same time,
      it may result in degradation of reads from secondary indexes, because it
      entails an additional lookup in the primary index per each "phantom"
      tuple (a tuple that was deleted in the primary index, but not yet in the
      secondary index, and hence should be skipped on read).
      
      Example:
      
      ```lua
      box.schema.space.create('test', {
          engine = 'vinyl',
          defer_deletes = true,
      })
      ```
      
      If omitted on space creation, this option is set to the value of
      `box.cfg.vinyl_defer_deletes`, which is false by default.
      b9f6d385
    • vr009's avatar
      lua: fix SIGINT handling · a8b3b267
      vr009 authored
      Tarantool console quits if you type Ctrl+C.
      This patch fixes console behavior on sending SIGINT.
      Console discards the current input on typing Ctrl+C
      and invites user to the new line.
      
      In daemon mode the process will exit after receiving SIGINT.
      
      Test gh-2717 should be skipped on release build, cause it
      uses error injection which is enabled only on debug mode.
      
      Fixes #2717
      
      @TarantoolBot document
      Title: Use Ctrl+C to discard the input in console
      
      The signal SIGINT discards the input in console mode.
      When tarantool executes with -e flag or runs as a daemon, SIGINT
      kills the process and tarantool complains about it in log.
      a8b3b267
    • EvgenyMekhanik's avatar
      Fix crash in space on_replace triggers. · e4e65e40
      EvgenyMekhanik authored
      During DDL operations triggers of old space and new created space
      are swapped. This leads to crash in case if this swap occurs from
      space on_replace triggers. This patch banned all DDL operations
      from on_replace triggers.
      
      Closes #6920
      
      @TarantoolBot document
      Title: Ban DDL operations from space on_replace triggers
      
      Previously user can set function for space on_replace trigger,
      which performs DDL operation. This may leads to tarantool crash,
      that's why this patch bans DDL operations from on_replace triggers.
      All this operations fails with error: "Space on_replace trigger
      does not support DDL operations".
      e4e65e40
  3. Mar 16, 2022
  4. Mar 15, 2022
    • AnastasMIPT's avatar
      net.box: fix exception thrown on time-out error · c463e56b
      AnastasMIPT authored
      netbox_perform_request throws a general ClientError exception on
      time-out error: it should throw the more suitable and POSIX-compliant
      TimedOut exception which sets errno to ETIMEDOUT.
      
      Closes #6144
      
      NO_DOC=There is no mention of what kind of error is returned on timeout
      in the net.box documentation.
      c463e56b
    • mechanik20051988's avatar
      memtx: fixed incorrect calculation of the number of compressed tuples · 38b28e2e
      mechanik20051988 authored
      There was no zeroing of the number of compressed tuples in the case of
      space truncation. Also there was no update of compressed tuples count
      in case of using memtx mvcc engine. This patch fix these problems.
      
      Follow up #2695
      
      NO_CHANGELOG=bugfix
      NO_DOC=bugfix
      NO_TEST=test in ee version
      38b28e2e
  5. Mar 14, 2022
    • Nick Volynkin's avatar
      ci: remove Docker containers after running builds · 065c2874
      Nick Volynkin authored
      Run `docker run` with `--rm` to remove contaners after running
      a container-based build.
      These containers are never reused, so there's no reason to keep them.
      Instead, a new container is created for each build.
      Not removing them results in wasting disk space on CI runners.
      
      NO_DOC=ci
      NO_CHANGELOG=ci
      NO_TEST=ci
      065c2874
    • Mergen Imeev's avatar
      sql: allow to bind DATETIME values · 9ffb50d5
      Mergen Imeev authored
      Part of #6773
      
      NO_DOC=Doc-request will be added in another commit.
      NO_CHANGELOG=Changelog will be added in another commit.
      9ffb50d5
    • Mergen Imeev's avatar
      sql: introduce DATETIME to SQL · 6dcd3822
      Mergen Imeev authored
      This patch introduces basic DATETIME support in SQL. After this patch,
      it will be allowed to select DATETIME values from spaces, insert them
      into spaces, and use them in functions. CAST() from DATETIME to STRING,
      SCALAR and ANY is also supported.
      
      Part of #6773
      
      NO_DOC=Doc-request will be added in another commit.
      NO_CHANGELOG=Changelog will be added in another commit.
      6dcd3822
    • Vladimir Davydov's avatar
      msgpack: add iterator.take_array · 68bf3885
      Vladimir Davydov authored
      NO_CHANGELOG=feature was not released
      
      Closes #6823
      
      @TarantoolBot document
      Title: Document msgpack object iterator take_array method
      
      The new method copies the given number of msgpack values starting from
      the iterator cursor position to a new msgpack array object. On success
      it returns the new msgpack object and advances the iterator cursor. If
      there isn't enough values to decode, it raises a Lua error and leaves
      the iterator cursor unchanged.
      
      This function could be implemented in Lua like this:
      
      ```lua
      function take_array(iter, count)
          local array = {}
          for _ = 1, count do
              table.insert(array, iter:take())
          end
          return msgpack.object(array)
      end
      ```
      
      Usage example:
      
      ```lua
      local mp = msgpack.object({10, 20, 30, 40})
      local it = mp:iterator()
      it:decode_array_header()       -- returns 4
      it:decode()                    -- returns 10
      local mp2 = it:take_array(2)
      mp2:decode()                   -- returns {20, 30}
      it:decode()                    -- returns 40
      ```
      68bf3885
  6. Mar 11, 2022
    • Timur Safin's avatar
      datetime: fix normalization with intervals · 14fe4508
      Timur Safin authored
      Normalization was unnecessary in negative interval values
      close to 0. This led to extra second in result, like:
      
      ```
      tarantool> date.now() - date.now()
      ---
      - -1.000026000 seconds
      ...
      ```
      
      We do need to normalize when assign to datetime values, but not for
      intermediate intervals.
      
      Closes #6882
      
      NO_DOC=bugfix
      14fe4508
    • Andrey Saranchin's avatar
      memtx: say address of memtx_tuple in memtx_tuple_delete() · ca68c6d7
      Andrey Saranchin authored
      The problem is memtx_tuple_new() says address of memtx_tuple, while
      memtx_tuple_delete() says address of an actual tuple (part of memtx_tuple).
      Different addresses in log may be confusing so the patch fixes the problem.
      
      Closes #6634
      
      NO_CHANGELOG=no visible changes
      NO_DOC=no visible changes
      ca68c6d7
  7. Mar 10, 2022
  8. Mar 09, 2022
    • Cyrill Gorcunov's avatar
      qsync: order access to the limbo terms · b6cbe494
      Cyrill Gorcunov authored
      
      Limbo terms tracking is shared between appliers and when
      one of appliers is waiting for write to complete inside
      journal_write() routine, an other may need to access read
      term value to figure out if promote request is valid to
      apply. Due to cooperative multitasking access to the terms
      is not consistent so we need to be sure that other fibers
      read up to date terms (ie written to the WAL).
      
      For this sake we use a latching mechanism, when one fiber
      takes a lock for updating other readers are waiting until
      the operation is complete.
      
      For example here is a call graph of two appliers
      
      applier 1
      ---------
      applier_apply_tx
        (promote term = 3
         current max term = 2)
        applier_synchro_filter_tx
        apply_synchro_row
          journal_write
            (sleeping)
      
      at this moment another applier comes in with obsolete
      data and term 2
      
                                    applier 2
                                    ---------
                                    applier_apply_tx
                                      (term 2)
                                      applier_synchro_filter_tx
                                        txn_limbo_is_replica_outdated -> false
                                      journal_write (sleep)
      
      applier 1
      ---------
      journal wakes up
        apply_synchro_row_cb
          set max term to 3
      
      So the applier 2 didn't notice that term 3 is already seen
      and wrote obsolete data. With locking the applier 2 will
      wait until applier 1 has finished its write.
      
      We introduce the following helpers:
      
      1) txn_limbo_begin: which takes a lock
      2) txn_limbo_commit and txn_limbo_rollback which simply release
         the lock but have different names for better semantics
      3) txn_limbo_process is a general function which uses x_begin
         and x_commit helper internally
      4) txn_limbo_apply to do a real job over processing the
         request, it implies that txn_limbo_begin been called
      
      Testing such in-flight condition won't be easy so we introduce
      "box.info.synchro.queue.busy" field to report if limbo is
      currently latched and processing a sync request.
      
      @TarantoolBot document
      Title: synchronous replication changes
      
      `box.info.synchro.queue` gets a new `busy` field. It is set to
      `true` when there is a synchronous transaction is processing
      but not yet complete. Thus any other incoming synchronous
      transactions will be delayed until active one is finished.
      
      Part-of #6036
      
      Acked-by: default avatarSerge Petrenko <sergepetrenko@tarantool.org>
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
      b6cbe494
    • Cyrill Gorcunov's avatar
      latch: add latch_is_locked helper · 19e1d90a
      Cyrill Gorcunov authored
      
      To test if latch is locked.
      
      Part-of #6036
      
      NO_DOC=Internal helper for next patch
      NO_CHANGELOG=Internal helper for next patch
      
      Acked-by: default avatarSerge Petrenko <sergepetrenko@tarantool.org>
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
      19e1d90a
  9. Mar 05, 2022
  10. Mar 04, 2022
  11. Mar 03, 2022
    • Igor Munkin's avatar
      luajit: bump new version · 297c3349
      Igor Munkin authored
      * ci: introduce GitHub Actions
      
      NO_DOC=LuaJIT submodule bump
      NO_CHANGELOG=no visible changes
      297c3349
    • mechanik20051988's avatar
      Implement stubs for tuple compression · 3b028af7
      mechanik20051988 authored
      This commit add stub functions for tuple compression. Now after new
      tuple allocation, we check if space format contains compression for
      some fields and if it so, we compress new allocated tuple. When we
      return tuple from space to user (from box_select or using C API), we
      check if tuple is compressed and if it is so decompress tuple.
      In opensource version user unable to set compression for tuple fields,
      so all stub functions are unreachable.
      
      Closes #2695
      
      NO_CHANGELOG=stubs for enterprise version
      NO_DOC=stubs for enterprise version
      3b028af7
    • mechanik20051988's avatar
      Move and rename `index_build` function · 089f6fa0
      mechanik20051988 authored
      Currently `index_build` function used only for build secondary
      indexes in memtx engine. Move and rename it to simplify subsequent
      implementation of tuple compression.
      
      Part of #2695
      
      NO_CHANGELOG=refactoring
      NO_DOC=refactoring
      089f6fa0
    • mechanik20051988's avatar
      Rework `index_get` and `iterator_next`functions · cdfc7cbd
      mechanik20051988 authored
      Currently `index_get` and `iterator_next` functions return
      result tuple as is, without any transformation, because
      tuple is stored in the space in the same format in which
      it is returned to the user. Later after tuple compression
      implementation (and maybe some other features) tuple should
      be transformed before return it to user. Rework `index_get`
      and `iterator_next` functions - now they are expected to
      return the tuple in format appropriate for user. Implement
      `index_get_raw` and `iterator_next_raw` functions, which
      return tuple as is.
      
      Part of #2695
      
      NO_CHANGELOG=internal changes
      NO_DOC=internal changes
      cdfc7cbd
    • mechanik20051988's avatar
      memtx: implement functions for memtx indexes vtab selection · 9c7eb170
      mechanik20051988 authored
      When implementing tuple compression, we need to change memtx
      indexes vtab dynamically, when we change space format. For
      this purpose we implement helpful functions for memtx index
      vtab selection.
      
      Part of #2695
      
      NO_CHANGELOG=refactoring
      NO_DOC=refactoring
      9c7eb170
    • mechanik20051988's avatar
      memtx: convert memtx index files from *.c to *.cc · 3571fc15
      mechanik20051988 authored
      When implementing tuple compression, it is planned
      to use templates to select index vtab. Templates
      enabled only in c++, so we convert all associated
      files from *.c to *.cc.
      
      Part of #2695
      
      NO_CHANGELOG=refactoring
      NO_DOC=refactoring
      3571fc15
    • EvgenyMekhanik's avatar
      txn: impement special structure for rollback infomation · 6af7b86e
      EvgenyMekhanik authored
      Currently memtx use stmt->old_tuple and stmt->new_tuple
      for rollback, but later when tuple compression will be
      implemented we need special place to store tuples, which
      was inserted or deleted during transaction, because
      stmt->old_tuple and stmt->new_tuple are used in on_replace
      triggers and should be decompressed.
      
      Part of #2695
      
      NO_CHANGELOG=internal changes
      NO_DOC=internal changes
      6af7b86e
    • EvgenyMekhanik's avatar
      memtx: moved common code into one function · fa1e912f
      EvgenyMekhanik authored
      The purpose of this commit is code refactoring, such that all
      the work which is common to insert/replace/delete/update/upsert
      functions in memtx space is done in one place.
      
      Part of #2695
      
      NO_CHANGELOG=refactoring
      NO_DOC=refactoring
      fa1e912f
    • mechanik20051988's avatar
      alter: implement ability to set compression for tuple fields · a51313a4
      mechanik20051988 authored
      Implement ability to set compression for tuple fields. Compression type
      for tuple fields is set in the space format, and can be set during space
      creation or during setting of a new space format.
      ```lua
      format = {{name = 'x', type = 'unsigned', compression = 'none'}}
      space = box.schema.space.create('memtx_space', {format = format})
      space:drop()
      space = box.schema.space.create('memtx_space')
      space:format(format)
      ```
      For opensource build only one compression type ('none') is
      supported. This type of compression means its absence, so
      it doesn't affect something.
      
      Part of #2695
      
      NO_CHANGELOG=stubs for enterprise version
      NO_DOC=stubs for enterprise version
      a51313a4
    • mechanik20051988's avatar
      cmake: add `coll` library as a target link library for `tuple` library · f589b536
      mechanik20051988 authored
      Library `tuple` depends on the `coll` library, since `key_def.c` file
      from the `tuple` library use functions from the `coll` library. This
      usually does not cause problems, since the `coll` library links with
      tarantool and resolves symbols in `tuple` library. For tests it is not
      a problem, because functions from the `tuple` library, which depends
      from the `coll` library are `static inline` and they they are not used
      in tests. But adding not `static inline` function in `tuple` library
      which depends on `coll` library leads to unresolved symbols in tests.
      Fix this explicitly adding `coll` library as a target link library
      for `tuple` library. Also remove `${ICU_LIBRARIES}` from target link
      libraries of `tuple` library because `tuple` library use ICU only via
      `coll` library.
      
      NO_CHANGELOG=cmake
      NO_DOC=cmake
      f589b536
    • mechanik20051988's avatar
      msgpack: add stubs for compressed data support · 55f968b4
      mechanik20051988 authored
      This commit add stub functions for compressed data
      support. Add new MP_EXT type MP_COMPRESSION. Despite
      the fact that this type is added to open source version
      all functions for working with it are implemented only
      in enterprise version of tarantool. In open source version
      add stubs for appropriate functions.
      
      Part of #2695
      
      NO_CHANGELOG=stubs for enterprise version
      NO_DOC=stubs for enterprise version
      55f968b4
Loading