Skip to content
Snippets Groups Projects
  1. Sep 09, 2021
    • 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
  2. 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
  3. 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
  4. 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
  5. Aug 27, 2021
  6. Aug 25, 2021
  7. 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
  8. Aug 19, 2021
    • Alexander Turenko's avatar
      github-ci: don't deploy tarballs per push · f820a3a8
      Alexander Turenko authored
      Follows up #6185
      f820a3a8
    • Mergen Imeev's avatar
      fc1dd039
    • Mergen Imeev's avatar
      sql: arguments check for string value functions · 0bad5bda
      Mergen Imeev authored
      This patch enables static and dynamic type check for functions SUBSTR(),
      GROUP_CONCAT(), REPLACE(), TRIM(). All these functions afther this patch
      will be able to return VARINARY value when VARBINARY arguments are given
      instead of STRING arguments.
      
      Closes #6105
      0bad5bda
    • Mergen Imeev's avatar
      sql: check argument types of sum(), avg(), total() · 6060958c
      Mergen Imeev authored
      This patch enables static and dynamic type check for aggregate functions
      SUM(), AVG() and TOTAL().
      
      Part of #6105
      6060958c
    • Mergen Imeev's avatar
      sql: fix result type of min() and max() functions · 0f144350
      Mergen Imeev authored
      Prior to this, the patch functions MIN(), MAX(), LEAST() and GREATEST()
      showed SCALAR as result types in metadata. However, in reality, the type
      of the result could be any scalar type. After this patch, the type of
      the result will always be the same as the type in the metadata. Also,
      for MIN() and MAX() functions, the type of the result will be the same
      as the type of the argument. For the LEAST() and GREATEST() functions,
      the result type will be the same as the type of the arguments if all
      arguments are of the same type, or it will be NUMBER if all arguments
      are of numeric types, or it will be SCALAR.
      
      Part of #6105
      0f144350
    • Mergen Imeev's avatar
      sql: enable types checking for some functions · 33d80c8c
      Mergen Imeev authored
      This patch enables static and dynamic type checks for functions that do
      not need any rework.
      
      Part of #6105
      33d80c8c
    • Mergen Imeev's avatar
      sql: runtime type check for SQL built-in functions · c7ceda03
      Mergen Imeev authored
      This patch introduces a runtime type checking mechanism for SQL built-in
      functions. However, it is currently disabled as the functions themselves
      need to be prepared for such changes.
      
      Part of #6105
      c7ceda03
    • Mergen Imeev's avatar
      sql: static type check for SQL built-in functions · 8f66f6b0
      Mergen Imeev authored
      This patch introduces a static type checking mechanism for SQL built-in
      functions. However, it is currently disabled as the functions themselves
      need to be prepared for such changes.
      
      Part of #6105
      8f66f6b0
    • Mergen Imeev's avatar
      sql: check number of arguments during parsing · 969c3ba5
      Mergen Imeev authored
      Prior to this patch, the number of arguments for functions with a
      variable number of arguments was checked at runtime. After this patch,
      it will be checked during parsing. For functions with a constant number
      of arguments, it is always checked during parsing.
      
      Part of #6105
      969c3ba5
    • Mergen Imeev's avatar
      sql: rework SQL built-in functions hash table · bcbbb6e6
      Mergen Imeev authored
      Currently, the SQL built-in hash table contains one already defined
      implementation for each SQL built-in function. This is rather
      inconvenient because some built-in SQL functions can accept arguments of
      more than one type, and the type of the result can depend on the types
      of the arguments. In addition, the number of arguments can be variable
      for some built-in SQL functions. For these reasons, we are forced to
      check the number of arguments and their type at runtime. To make it
      possible to check types of arguments and their number during parsing,
      the hash table has been modified so that functions can now have more
      than one implementation.
      
      Part of #6105
      bcbbb6e6
    • Mergen Imeev's avatar
      sql: modify signature of TRIM() · d47204a1
      Mergen Imeev authored
      This patch changes the signature of SQL built-in function TRIM(). This
      gives us an easier way to check the types of the arguments to this
      function. Additionally, these changes fix a bug where using TRIM with
      the BOTH, LEADING, or TRAILING keywords would result in a loss of a
      collation.
      
      Needed for #6105
      Closes #6299
      d47204a1
    • VitaliyaIoffe's avatar
      github-ci: hotfix for updating S3 in CI · ffec0de3
      VitaliyaIoffe authored
      Follow-up #6185
      ffec0de3
    • Mergen Imeev's avatar
      sql: add changelog for introducing DECIMAL · bd938bb9
      Mergen Imeev authored
      bd938bb9
    • Mergen Imeev's avatar
      sql: fix quote() function · 62d622f8
      Mergen Imeev authored
      After this patch SQL built-in function QUOTE() will return the argument
      in case DOUBLE value is given. If the argument is not number, string
      representation of the argument will be returned.
      
      Closes #6239
      
      @TarantoolBot document
      Title: QUOTE() and DOUBLE argument
      
      After this patch function QUOTE() will return argument in case it
      receives DOUBLE value as an argument. The same for all other numeric
      types. In case it was given value of non-numeric type, it will return
      string representation of the argument.
      62d622f8
Loading