Skip to content
Snippets Groups Projects
  1. Sep 16, 2021
  2. Sep 14, 2021
  3. Sep 10, 2021
    • Oleg Babin's avatar
      fiber: keep reference to userdata if fiber created once · b0431cf8
      Oleg Babin authored
      This patch reworks approach to fiber management in Lua. Before
      this patch each action that should return fiber led to new
      userdata creation that was quite slow and made GC suffer. This
      patch introduces new field in struct fiber to store a reference to
      userdata that was created once for a fiber. It allows speedup
      operations as fiber.self() and fiber.id().
      Simple benchmark shows that access to fiber storage is faster in
      two times, fiber.find() - 2-3 times and fiber.new/create functions
      don't have any changes.
      b0431cf8
    • Oleg Babin's avatar
      fiber: correctly initialize storage_ref value · e3b24fe2
      Oleg Babin authored
      Before this patch we used an assumption in lua fiber code that
      all valid lua refs are positive numbers. However there are
      special constants defined in lua header for such purpose LUA_NOREF
      and LUA_REFNIL [1]. This patch introduces special value in fiber
      module that is equal to LUA_REFNIL to be sure that this value will
      be correct in future static assert is added.
      
      Also this patch introduces several usages of this value - let's
      make fiber code more clearer and start to initialize ref values
      with LUA_NOREF value. Also it will be needed for future changes.
      
        [1] https://pgl.yoyo.org/luai/i/luaL_ref
      e3b24fe2
    • Oleg Babin's avatar
      fiber: pass struct fiber into lbox_pushfiber instead of id · fa30d9db
      Oleg Babin authored
      For future changes we will need the fiber object, not only its id.
      fa30d9db
    • Oleg Babin's avatar
      fiber: rename ref to storage_ref · 4d3201f3
      Oleg Babin authored
      Ref is a lua reference to fiber storage. This patch just renames
      storage.lua.ref to storage.lua.storage_ref to underline that
      it's not a reference to fiber itself and needed only for fiber
      storage.
      4d3201f3
    • Andrey Saranchin's avatar
      memtx: stop rollbacked changes appear in built-in-background index · d57acbcd
      Andrey Saranchin authored
      The problem is if we add a tuple to index and then fiber yield occurs (build-in-background),
      replace of this tuple will change it in building index, but it will not be changed back
      in case of rollback.
      
      Closes #5958
      d57acbcd
    • Andrey Saranchin's avatar
      memtx: fix memory leak during primary index background alter · f2e99d12
      Andrey Saranchin authored
      Currently, if we delete tuple while primary index is altering in background,
      a reference to removed tuple will be kept by primary index.
      
      Closes #6290
      
      Part of #5958
      f2e99d12
  4. Sep 09, 2021
    • Mergen Imeev's avatar
      sql: fix comparison between DECIMAL and big DOUBLE · a3ba5f81
      Mergen Imeev authored
      This patch fixes the comparison between DECIMAL as a left value and
      DOUBLE greater than or equal to 1e38 or less than or equal to -1e38 as a
      right value. Any DOUBLE value greater than or equal to 1e38 is now
      greater than any DECIMAL value, and a DOUBLE value less than or equal to
      -1e38 is less than any DECIMAL value. This is because our decimal cannot
      contain more than 38 digits.
      
      Closes #6376
      a3ba5f81
    • Serge Petrenko's avatar
      xrow: reset parameters of decode_subscribe() to default · a7aad227
      Serge Petrenko authored
      Nullify all the output parameters passed to xrow_decode_subscribe().
      
      This should help us get rid of cases when some of the parameters were
      left uninitialized when the SUBSCRIBE request didn't contain the
      corresponding fields.
      
      Also it's now possible to remove all the explicit parameter
      initializations for xrow_decode_* functions using
      xrow_decode_subscribe() internally. Do that as well.
      
      Follow-up #6034
      a7aad227
    • EvgenyMekhanik's avatar
      iproto: fix dropping messages when connection is closed with SHUT_RDWR. · 127e0c1c
      EvgenyMekhanik authored
      Fixed dropping incoming messages when connection is closed or SHUT_RDWR
      received and net_msg_max or readahead limit is reached. Now we don't close
      connection if an error occurred while writing response, but only set a
      special flag to stop further writing. Connection will be closed when we
      read 0 from socket and process all requests.
      
      Closes #6292
      127e0c1c
    • EvgenyMekhanik's avatar
      iproto: implement getting statistics for iproto streams · 28de3fec
      EvgenyMekhanik authored
      Currently there are several statistic metrics for iproto, which can
      be obtained by using `box.stat.net`: `CONNECTIONS`, `REQUESTS`, `SENT`
      and `RECEIVED`. Add new metric `STREAMS` which contain statistics for
      iproto streams.
      
      Part of #6293
      
      @TarantoolBot document
      Title: getting statistics for iproto streams was implemented
      Add new  metric `STREAMS` to `box.stat.net`, which contain statistics
      for iproto streams. `STREAMS` contains same counters as `CONNECTIONS`
      metric in `box.stat.net`: current, rps and total. For example:
      STREAMS:
        current: 0
        rps: 17980
        totat: 112623
      28de3fec
    • EvgenyMekhanik's avatar
      iproto: implement getting network statistic per thread · 6fd94e29
      EvgenyMekhanik authored
      Currently getting iproto statistics per thread is possible only
      in debug mode, using `ERRINJ_IPROTO_SINGLE_THREAD_STAT` (it can be
      used only in tests). This way have several disadvantages: first of
      all `errinj` is not a place to get statistics, secondly user may be
      interested in getting iproto statistics per thread. In this patch
      `box.stat.net.thread` was implemented, it can be used for getting
      same statistics as from `box.stat.net` but per thread.
      
      Part of #6293
      
      @TarantoolBot document
      Title: getting network statistic per thread was implemented
      User has possibility to run several iproto threads, but at the moment
      he can get only general statistics, which combines statistics for all
      threads. Now `box.stat.net.thread` has been implemented to get the same
      statistics as when using `box.stat.net`, but for a thread. User can call
      `box.stat.net.thread()` as a function to get general network statistics
      per threads. For example for two iproto threads:
      ---
      - - SENT:
            total: 0
            rps: 0
          CONNECTIONS:
            current: 0
            rps: 0
            total: 0
          REQUESTS:
            current: 0
            rps: 0
            total: 0
          RECEIVED:
            total: 0
            rps: 0
        - SENT:
            total: 0
            rps: 0
          CONNECTIONS:
            current: 0
            rps: 0
            total: 0
          REQUESTS:
            current: 0
            rps: 0
            total: 0
          RECEIVED:
            total: 0
            rps: 0
      ...
      
      Also user can indexed it as a table by thread number. For example
      `box.stat.net.thread[1]` returns network statistics for first iproto
      thread:
      ---
      - SENT:
          total: 0
          rps: 0
        CONNECTIONS:
          current: 0
          rps: 0
          total: 0
        REQUESTS:
          current: 0
          rps: 0
          total: 0
        RECEIVED:
          total: 0
          rps: 0
      ...
      6fd94e29
  5. Sep 08, 2021
    • Vladimir Davydov's avatar
      box: reuse formats exported to Lua · 10726acf
      Vladimir Davydov authored
      Make lbox_tuple_format_new (exported as box.internal.new_tuple_format to
      Lua) reuse tuple formats. It's safe, because formats exported to Lua are
      immutable. This fixes a net.box error when one creates/closes a lot of
      net.box connections: a net.box connection creates a few formats for a
      local version of the schema so if the garbage collector isn't invoked to
      clean up after it, Tarantool can run out of format ids.
      
      Closes #6217
      10726acf
    • Vladimir Davydov's avatar
      box: include dictionary into tuple_format hash and comparison · 25b19ffe
      Vladimir Davydov authored
      An ephemeral space format doesn't have a dictionary so we ignore
      dictionaries in format hashing and comparison functions. However,
      formats exported to Lua (for net.box schema), which could also be
      reused, do define field names. Since we'd like to reuse those as well,
      we need to take field names into account while doing format hashing and
      comparison.
      
      Needed for #6217
      25b19ffe
    • Vladimir Davydov's avatar
      box: rename tuple_format::is_ephemeral to is_reusable · 747c8c00
      Vladimir Davydov authored
      Apart from ephemeral space formats, we can also reuse formats exported
      to Lua, e.g. for net.box schema. Let's rename the flag and update the
      comments to be relevant for all cases.
      
      Needed for #6217
      747c8c00
    • Vladimir Davydov's avatar
      core: add x* memory allocation functions · 60dc88ea
      Vladimir Davydov authored
      This patch adds xmalloc, xcalloc, xrealloc, xstrdup, and xstrndup helper
      functions. Each of them calls the corresponding memory allocation
      function and panics if it fails. See the issue description for the full
      justification.
      
      Closes #3534
      60dc88ea
  6. Sep 02, 2021
    • Mergen Imeev's avatar
      sql: fix error on copy empty string in mem_copy() · 2f21f323
      Mergen Imeev authored
      This patch fixes the problem with copying an empty string in mem_copy().
      Previously, because the string length was 0, an error was thrown, but
      the diag was not set, which could lead to an error due to an empty diag
      or to a double free.
      
      Closes #6157
      Closes #6399
      2f21f323
  7. Sep 01, 2021
    • Nikita Pettik's avatar
      test: fix box/gh-5998-one-tx-for-ddl-errinj.test.lua · dd5c29cc
      Nikita Pettik authored
      It contains test case verifying that during parallel index build the
      first index to finish wins the race and aborts another TX(s). For the
      synchronization sake channels were used. However, in fact containing the
      same number of tuples in indexes we can't predict which index finishes
      first, so sometimes channel:get() executed inside fiber building index
      may hang. Hence, let's simply fill one of spaces with a bit more tuples
      and remove channel:get() from functions building indexes.
      
      Closes #6354
      dd5c29cc
    • Nikita Pettik's avatar
      tuple: add check string check to tuple_field_uuid() · f34e891b
      Nikita Pettik authored
      In case we are updating "cluster" field in on_replace_dd_schema trigger
      we do not check verifying that value corresponding to "cluster" key is
      uuid. Meanwhile in contrast to other tuple_field_*() decoding functions
      tuple_field_uuid() EXPECTS that passed value is type of mp_string. So
      let's add extra string check to tuple_field_uuid().
      
      Closes #6332
      f34e891b
    • Nikita Pettik's avatar
      alter: remove exception raise from on_replace_dd_schema trigger · 433f1e78
      Nikita Pettik authored
      On replace data-dictionary triggers do not expect that exceptions can be
      raised from their body. Unfortunately, on_replace_dd_schema still
      contains one invocation of diag_raise() which may lead to unpredictable
      results. So let's replace it with diag_set().
      
      Part of #5332
      433f1e78
    • EvgenyMekhanik's avatar
      test: enable part of iproto transaction test, blocked by #6338 · cc079b15
      EvgenyMekhanik authored
      In previous commit closing connection without dropping requests
      was implemented. Now we can enable part of iproto transaction test
      which depends on it. Also test was reworked to make it more clear
      and all tests for 'vinyl' was removed because they are not related
      to streams.
      cc079b15
    • EvgenyMekhanik's avatar
      net.box: implement connection closing without dropping requests · 72adeda6
      EvgenyMekhanik authored
      At the moment, when a net.box connection is closing we are cancel worker
      fiber. In this case, data that was not sent is lost. In this patch connection
      closing without dropping requests was implemented: before canceling fiber we
      wait on conditional variable until all data will be sent.
      
      Closes #6338
      72adeda6
    • EvgenyMekhanik's avatar
      lua: change luaT_checkfibercond signature and move it to public api · 68e768f3
      EvgenyMekhanik authored
      luaT_checkfibercond is necessary to implemenent closing connection
      without unsent data lost. Also all other similar functions have a
      different signiture.
      PArt of #6338
      68e768f3
    • Kirill Yukhin's avatar
      build: build libcurl with PIC enabled · 01964d4c
      Kirill Yukhin authored
      To be able to configure libcurl for ARM64 CPU
      on Fedora distros with linker hardening it is
      necessary to enable `-fPIC`. It fails with wrong
      relocation type for glibc symbols (e.g. socket)
      otherwise.
      
      Closes #6366
      01964d4c
    • Mergen Imeev's avatar
      sql: allow to bind DECIMAL values · a94986f2
      Mergen Imeev authored
      After this patch, DECIMAL values can be bound like any other supported
      by SQL values.
      
      Closes #4717
      a94986f2
  8. Aug 27, 2021
  9. Aug 25, 2021
  10. Aug 20, 2021
    • Vladimir Davydov's avatar
      test: fix box/net.box_is_nullable_gh-3256 · fb7fe96b
      Vladimir Davydov authored
      The new version (2.10.0) is considered to be lower than 2.2.1, because
      the test uses string comparison, which results in a test failure.
      
      Remove the useless check.
      fb7fe96b
    • Kirill Yukhin's avatar
      Generate changelog for 2.10.0-beta1 · 7da4b143
      Kirill Yukhin authored
      Four changelog entries were fixed to resolve syntax errors.
    • Kirill Yukhin's avatar
      Fix typos in unreleased changelogs · 289f0e85
      Kirill Yukhin authored
      289f0e85
    • Alexander Turenko's avatar
      github-ci: support the new version format · 9707a7bd
      Alexander Turenko authored
      The new release policy suggests to use X.Y.Z-alphaN, X.Y.Z-betaN,
      X.Y.Z-rcN tags for pre-releases. See the policy document here:
      https://github.com/tarantool/tarantool/discussions/6182
      
      This commit enforces the new versioning for tarantool builds that're
      made from CI.
      
      Tarballs
      --------
      
      When we'll add the 2.10.0-beta1 tag, the tarball will be named so:
      
      > tarantool-2.10.0-beta1.tar.gz
      
      When we'll add one commit upward the tag, the tarball will be named so:
      
      > tarantool-2.10.0-beta1.1.dev.tar.gz
      
      (In fact, we don't deploy tarballs per push anymore, so it is just for
      the same of completeness.)
      
      For 2.10.0 release it'll be named as:
      
      > tarantool-2.10.0.tar.gz
      
      How to try: `make -f .gitlab.mk source`.
      
      Packages
      --------
      
      When we'll add the 2.10.0-beta1 tag, the packages for Ubuntu Focal will
      be named so:
      
      > tarantool_2.10.0~beta1-1_amd64.deb
      > tarantool-common_2.10.0~beta1-1_all.deb
      > tarantool-dev_2.10.0~beta1-1_amd64.deb
      
      The sources packaged together with the package will be named so:
      
      > tarantool_2.10.0~beta1-1.debian.tar.xz
      > tarantool_2.10.0~beta1-1.dsc
      > tarantool_2.10.0~beta1.orig.tar.xz
      > tarantool-2.10.0~beta1.tar.xz
      
      When we'll add one commit upward the tag, those files will look so:
      
      > tarantool_2.10.0~beta1.1.dev-1_amd64.deb
      > tarantool-common_2.10.0~beta1.1.dev-1_all.deb
      > tarantool-dev_2.10.0~beta1.1.dev-1_amd64.deb
      
      > tarantool_2.10.0~beta1.1.dev-1.debian.tar.xz
      > tarantool_2.10.0~beta1.1.dev-1.dsc
      > tarantool_2.10.0~beta1.1.dev.orig.tar.xz
      > tarantool-2.10.0~beta1.1.dev.tar.xz
      
      (In fact, we don't deploy packages per push anymore, so it is just for
      the same of completeness.)
      
      For 2.10.0 release it'll be named so:
      
      > tarantool_2.10.0.gcb3bdbf2a-1_amd64.deb
      > tarantool-common_2.10.0.gcb3bdbf2a-1_all.deb
      > tarantool-dev_2.10.0.gcb3bdbf2a-1_amd64.deb
      
      > tarantool_2.10.0.gcb3bdbf2a-1.debian.tar.xz
      > tarantool_2.10.0.gcb3bdbf2a-1.dsc
      > tarantool_2.10.0.gcb3bdbf2a.orig.tar.xz
      > tarantool-2.10.0.tar.xz
      
      How to try: `OS=ubuntu DIST=focal make -f .gitlab.mk package`.
      
      Fixes #6184
      9707a7bd
    • Alexander Turenko's avatar
      test: update test-run (unix socket path length) · 6d7f82a3
      Alexander Turenko authored
      See the previous commit 'test: descrease instance file name length' for
      the problem description.
      
      Since we're going to use the tags like 2.10.0-beta1 for upcoming
      pre-releases, we have even less symbols for a filename of a unix socket.
      So I chose the shorter names on the test-run side: foo.socket-iproto ->
      foo.i, foo.socket-admin -> foo.c (console).
      
      See https://github.com/tarantool/test-run/pull/312
      
      This update is mostly necessary for the current master branch, but it'll
      be applied for 1.10 as well: we keep test-run consistent across alive
      branches.
      
      Part of #6184
      6d7f82a3
    • Alexander Turenko's avatar
      test: descrease instance file name length · a962cf59
      Alexander Turenko authored
      First, several facts:
      
      * The maximal unix socket file length is 108 symbols on Linux (in fact,
        107 for tarantool console socket, see #4634).
      * We run testing during building of RPM packages.
      * When tests are run, they use the build directory for temporary testing
        files and tarantool console unix socket files.
      * Test-run uses an instance script name to form a unix socket name for
        tarantool console.
      * We plan to change package version format and add .dev suffix for
        transient (non tagged) commits.
      * The package version participates in the build directory name, when
        we're building an RPM package.
      
      If we'll enable the new version format just now, we'll unable to listen
      on the unix socket like the following (the length is 111):
      
      ```
      /build/usr/src/debug/tarantool-2.9.0.353.dev/test/var/023_box/gh-3633-simple-tuple-size-increasing.socket-admin
      ```
      
      So I changed the instance file name to make it shorter.
      
      Of course, there are ways to solve the problem at all, this commit is
      just workaround.
      
      Part of #6184
      Follows up #3633
      a962cf59
    • VitaliyaIoffe's avatar
      github-ci: prevent locking ci · f9054f9a
      VitaliyaIoffe authored
      Was added 'export DEBIAN_FRONTEND=noninteractive', because there are
      packages, which are noninteractive by default. So, CI raises
      'Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?'.
      f9054f9a
    • VitaliyaIoffe's avatar
      github-ci: support arm packaging in workflows · 6d99f36f
      VitaliyaIoffe authored
      Were added workflows with *.rpm or *.deb packaging for arm architecture.
      Those workflows only verify package builds and don't deploy them to our
      repositories for now.
      
      Part of #6222
      6d99f36f
    • VitaliyaIoffe's avatar
      github-ci: turn off tests during packaging on arm64 · 24c065d6
      VitaliyaIoffe authored
      Tests were turned off from arm workflows according to instability.
      
      Needed for #6222
      24c065d6
    • Alexander Turenko's avatar
      github-ci: disable auto deployments for arm64 packages · c14c51de
      Alexander Turenko authored
      It requires update_repo.sh changes, which are not trivial in
      verification. We want to be sure that all apt/yum metainformation is
      generated correctly, so we'll postpone the automatic deployment task.
      
      Part of #6222
      c14c51de
  11. Aug 19, 2021
Loading