Skip to content
Snippets Groups Projects
  1. Dec 13, 2021
    • VitaliyaIoffe's avatar
      github-ci: delete option in Odroid debug workflow · c1b22724
      VitaliyaIoffe authored
      There was a build problem with CMAKE_BUILD_TYPE=Debug build on ARM64. It
       was fixed in 224cb68c (build: fix
       build on Linux ARM64 with CMAKE_BUILD_TYPE=Debug), before this fix
       '-DCMAKE_C_FLAGS="-Wno-type-limits "' was used to avoid the issue,
       implemented by 72c77166 (github-ci:
       add GitHub Actions workflow for Odroid).
      
      Follow-up #6143
      c1b22724
    • Andrey Kulikov's avatar
      debian: eliminate dependency from binutils package · a86f5963
      Andrey Kulikov authored
      tarantool debian package MUST NOT depends on binutils package. This is
      due to the fact that binutils include linker and assembler, what in most
      cases forbidden on production servers.
      
      This dependency is a residual from times, when tarantool did use libbfd
      for stack unwinding. Now it simply does not required at all.
      
      Fixes #6699
      a86f5963
    • mechanik20051988's avatar
      box: implement ability to pass several URIs in different ways · 4d10e252
      mechanik20051988 authored
      Previously, for "listen" and "replication" options URI can be passed
      as a number, as a string value or as a table, which contains numbers
      and strings, no special properties for URIs was available. Now user
      can pass URIs in different ways, same as in tarantool "uri" library:
      as before, as a table which contains URI and it's parameters in "param"
      table, as a table which contains URI strings and URI tables. Same
      as in "uri" library, which internally used to parse new "listen" and
      "replication" there are different ways to specify properties for URI:
      in a string which contains URI, after '?' delimiter, in a table which
      contains URI in "params" table, in "default_params" table if it is
      default parameters for all URIs.
      
      Closes #5928
      
      @TarantoolBot document
      Title: implement ability to pass several URIs in different ways
      Now there are several ways to pass multiple URIs for box.cfg.listen
      and box.cfg.replication:
      ```lua
      -- As a string with one or several URIs separated by commas
      -- (provides backward compatibility):
      box.cfg { listen = "127.0.0.1:3301, /unix.sock, 3302" }
      -- As an array which contains string URIs (unambiguous short form):
      box.cfg { listen = {"127.0.0.1:3301", "/unix.sock", "3302"} }
      -- As an array of tables with 'uri' field
      -- (may be extended with more fields in future):
      box.cfg {  listen = {
              {uri = "127.0.0.1:3301"},
              {uri = "/unix.sock"},
              {uri = 3302}
          }
      }
      ```
      4d10e252
    • mechanik20051988's avatar
      uri: implement ability to parse URIs passed in different ways · 37c35677
      mechanik20051988 authored
      Previously, URI can be passed as a string, which contains one URI
      or several URIs separated by commas. Now URIs can be passed in
      different ways: as before, as a table which contains URI and it's
      parameters in "param" table, as a table which contains URI strings
      and URI tables. Also there are different ways to specify properties
      for URI: in a string which contains URI, after '?' delimiter, in a
      table which contains URI in "params" table, in "default_params" table
      if it is default parameters for all URIs.
      For this purposes new method `parse_many` was implemented in tarantool
      `uri` library. Also `parse` method was updated to make possible the
      same as new `parse_many` method but only for single URI.
      ```lua
      uri = require('uri')
      -- Single URI, passed as before
      uri.parse_many("/tmp/unix.sock")
      -- Single URI, with query paramters
      uri.parse_many("/tmp/unix.sock?q1=v1&q2=v2")
      -- Several URIs with parameters in one string, separated by commas
      uri.parse_many("/tmp/unix.sock_1?q=v, /tmp/unix.sock_2?q=v")
      -- Single URI passed in table, with additional parameters, passed
      -- in "params" table. This parameters overwrite parameters from
      -- URI string (q1 = "v2" in example below).
      uri.parse_many({"/tmp/unix.sock?q1=v1", params = {q1 = "v2"}})
      -- For parse it's also works now
      uri.parse({"/tmp/unix.sock?q1=v1", params = {q1 = "v2"}})
      -- Several URIs passed in table with default parameters, passed
      -- in "default_params" table, which are used for parameters, which
      -- not specified for URI (q3 parameter with "v3" value corresponds
      -- to all URIs, and used if there is no such parameter in URI).
      uri.parse_many({
          "/tmp/unix.sock_1?q1=v1",
          { uri = "/tmp/unix.sock_2", params = { q2 = "v2" } },
          default_params = { q3 = "v3" }
      })
      ```
      37c35677
    • mechanik20051988's avatar
      uri: implement ability to parse several URIs · 3661bc3a
      mechanik20051988 authored
      Implement ability to parse a string, which contains several URIs
      separated by commas. Each URI can contain different query parameters
      after '?'. All created URIs saved in new implemented struct `uri_set`.
      
      Part of #5928
      3661bc3a
    • mechanik20051988's avatar
      uri: implement ability to parse URI query paramters · 27cef5c8
      mechanik20051988 authored
      Previously, the part of the URI string that comes after the first '?' was
      saved as a single unit in the field `query` as a part of `struct uri`. Now
      an array of URI paramters has been added to the uri structure, and query is
      subjected to the additional parsing and URI query parameters are extracted
      from it. The separator symbol between URI query parameters is '&', the
      separator symbol between parameter and it's value is '='. For example
      URI = "/tmp/unix.sock?q1=v11&q1=v12&q2=v2" has two parameters: parameter
      'q1' with two values 'v11' and 'v12' and parameter 'q2' with value 'v2'.
      
      Part of #5928
      Closes #1175
      27cef5c8
    • mechanik20051988's avatar
      uri: rework struct uri to use a copy of the original splitted string. · c65fd012
      mechanik20051988 authored
      In the future, it is planned to extend the URI structure to allow its
      passing with different options and in different formats (see next commit
      `uri: implement ability to parse URI query paramters` for example). For
      these purposes, it is planned to use functions that modify the source
      string, for example `strtok_r`, so we need to rework the URI structure
      to create copies of the string for each of the URI components.
      
      Part of #5928
      c65fd012
    • mechanik20051988's avatar
      uri: rename uri.* to uri_parser.* · 0765828e
      mechanik20051988 authored
      In the next commit we implement new `struct uri` and
      rename current `struct uri` to `struct uri_raw` which
      will be located in uri_parser.* files. Since git does
      not understand that we renamed file, if in the same
      commit we create file with the same name that file had
      before renaming, we will perform the renaming in a
      separate commit.
      
      Part of #5928
      0765828e
    • mechanik20051988's avatar
      uri: fix incorrect parse of unix socket URI with query · a54da468
      mechanik20051988 authored
      Previously in case when unix socket URI with query didn't
      contain "unix/:" prefix, parsing of this URI was incorrect.
      For example "/unix.sock?q=v" was parsed into "path: /unix.sock"
      and "query: x=y" instead of "host: unix/", "service: /unix.sock",
      "unix: /unix.sock" and "query: x=y". Now parsing of unix socket
      URI is independent from "unix/:" prefix and correct.
      Pay attention, all parsing logic is realized in uri.rl file which
      compiled in uri.c using 'ragel'.
      
      Part of #5928
      a54da468
    • mechanik20051988's avatar
      test: little fixes to make error message if test fails more clear · 2a40dada
      mechanik20051988 authored
      The third parameter passed to the 'test:is' function is a message
      and usually should described what test checked.
      2a40dada
  2. Dec 10, 2021
    • Andrey Saranchin's avatar
      memtx: raise an error if argument of select() is a "clear" dict · a281c742
      Andrey Saranchin authored
      Currently, select/pairs/get look at an :array part of passed table,
      that is why different problems occurs when passed to select() table
      is not a regular array.
      
      Now we will check if passed table is not "clear dict"
      (not empty table without array part). Invalid queries
      like s:select{key = 'value'} will fail with an appropriate
      error, but the problems with dicts containing array part
      still remain (for example, s:select{1, key = 'value'} is
      the same as s:select{1}).
      
      Closes #6167
      a281c742
    • Vladimir Davydov's avatar
      cmake: embed luarocks in static build · 0315c2db
      Vladimir Davydov authored
      Without it `tarantoolctl rocks` would require luarocks to be installed
      on the system, which isn't always possible.
      0315c2db
    • Vladimir Davydov's avatar
      cmake: add prefix to symbol names used for jit lua modules · 74e8c968
      Vladimir Davydov authored
      To avoid possible name clashes: e.g. we might want to add a module
      'dump' to the built-in lib, but the symbol name dump_lua is already
      taken for 'jit.dump' - so better rename dump_lua to jit_dump_lua.
      74e8c968
    • Vladimir Davydov's avatar
      cmake: pass symbol name explicitly to lua_source and bin_source · f5a7bb42
      Vladimir Davydov authored
      Currently, the symbol name is deducted from the filename, but it may
      lead to name clashes if different packages have modules with same names.
      Let's pass the symbol name explicitly to avoid that.
      
      This is needed to embed luarocks in static build.
      f5a7bb42
    • Vladimir Davydov's avatar
      cmake: embed lua-zlib in static build · 78ac485a
      Vladimir Davydov authored
      This is needed to embed luarocks in static build.
      78ac485a
    • Vladimir Davydov's avatar
      cmake: factor out FindZLIB · 4bd44330
      Vladimir Davydov authored
      Zlib is used in OpenSSL and in libCURL. Besides, we will need it for
      lua-zlib. So better define FindZLIB.
      
      Note, `add_library(ZLIB::ZLIB UNKNOWN IMPORTED)` and setting the
      corresponding properties in FindZLIB.cmake is needed to build libcurl,
      which depends on zlib.
      4bd44330
  3. Dec 09, 2021
  4. Dec 08, 2021
    • Vladislav Shpilevoy's avatar
      test: fix flaky read_only_reason test · e7f1e2fe
      Vladislav Shpilevoy authored
      This is a second attempt to stabilize #5568 test since
      5105c2d7 ("test: fix flaky
      read_only_reason test").
      
      It had several failures with various frequency.
      
      * test_read_only_reason_synchro() could see ro_reason as nil even
        after box.error.READONLY was raised (and some yields passed);
      
      * test_read_only_reason_orphan() could do the same;
      
      * `box.ctl.demote()` could raise error "box.ctl.demote does not
        support simultaneous invocations".
      
      The orphan failure couldn't be reproduced. It was caught only
      locally, so maybe it was just some unnoticed diff breaking the
      test.
      
      Failure of test_read_only_reason_synchro() could happen when
      demote() was called in a previous test case, then the current test
      case called promote(), then got box.error.READONLY on the replica,
      then that old demote() was delivered to replica, and the attempt
      to get ro_reason returned nil. It is attempted to be fixed with
      replication_synchro_quorum = 2, so master promote()/demote() will
      implicitly push the previous operation to the replica. Via term
      bump and quorum wait.
      
      Additionally, huge replication_synchro_timeout is added for manual
      promotions. Automatic promotion is retried so here the timeout is
      not so important.
      
      `box.ctl.demote` failure due to `simultaneous invocations` seems
      to be happening because the original auto-election win didn't
      finish limbo transition yet. Hence the instance calling demote()
      now would think it is called 'simultaneously' with another
      promote()/demote().
      
      It is attempted to be fixed from 2 sides:
      
      - Add waiting for `not box.info.ro` on the leader node after
        auto-promotion. To ensure the limbo is taken by the leader;
      
      - The first option didn't help much, so `box.ctl.demote()` is
        simply called in a loop until it succeeds.
      
      Closes #6670
      e7f1e2fe
    • Alexey Vishnyakov's avatar
      swim: fix debug assertion abort in proto decode · d1a60af5
      Alexey Vishnyakov authored
      assert(cur < end) after mp_load_u8 in mp_check_binl was failing
      d1a60af5
    • Alexander Turenko's avatar
      build: fix linking of debug curl library · 6ab951fd
      Alexander Turenko authored
       | [100%] Linking C static library libcurl-d.a
       | <...>
       | make[3]: *** No rule to make target `build/curl/dest/lib/libcurl.a',
       |     needed by `test/unit/luaL_iterator.test'. Stop.
      
      The problem appears on Mac OS. It is a bit strange that we don't see it
      on Linux. However I didn't dig into this, just fixed the observed
      problem.
      
      Related: https://github.com/curl/curl/issues/2121
      
      Fixes #6656
      6ab951fd
    • Serge Petrenko's avatar
      replication: fix flaky gh-3160-misc... test · 8c187df5
      Serge Petrenko authored
      The test fails quite often with one of the following results.
      
      Either
      
      [001] @@ -60,7 +60,7 @@
      [001]  ...
      [001]  test_timeout()
      [001]  ---
      [001] -- true
      [001] +- false
      [001]  ...
      [001]  test_run:cmd("switch default")
      [001]  ---
      [001]
      
      Or
      
      [034]  test_timeout()
      [034]  ---
      [034] -- true
      [034] +- error: 'replicas are not in the follow status'
      [034]  ...
      
      Both errors are caused by wait_cond checking saved
      `box.info.replication` values instead of actual `box.info.replication`
      output. Fix this.
      
      Also, the test's quite long for no reason.
      
      The wait_cond waiting for replication to break lasts a whole
      `replication_timeout`, which is excess.
      
      The test's idea, as stated in the commit that has introduced it
      (195d4462: Send relay heartbeat if wal changes won't be send) is to
      constantly relay some data to the remote peers and make
      it so their relays never send heartbeats.
      
      If we wait for a whole replication timeout between inserts, there's a high
      chance of peer relays waking up naturally (after replication_timeout passes).
      
      In this case the test tests nothing. Fix the issue by waiting for ~ 1/5
      of replication_timeout in between the despatches. This also reduces test
      run time from ~4.5 to ~1.5 seconds on my machine.
      
      Remove the test from fragile list, since it shouldn't be flaky anymore.
      
      Closes #4940
      8c187df5
  5. Dec 07, 2021
    • Georgiy Lebedev's avatar
      popen: change vfork deprecation error to a warning · c9787d57
      Georgiy Lebedev authored
      vfork got deprecated on macOS: for now, change the vfork deprecation
      error to a warning until we find a suitable solution. We plan to review
      popen's design and get rid of vfork completely or change vfork to
      posix_spawn only on macOS in #6674.
      
      Closes #6576
      c9787d57
    • Georgiy Lebedev's avatar
      core: refactor crash signal handler · f779df96
      Georgiy Lebedev authored
      vfork got deprecated on macOS: change vfork to more portable
      posix_spawn.
      
      Needed for #6576
      f779df96
    • mechanik20051988's avatar
      small: fix incorrect mempool group creation · 173ce9fb
      mechanik20051988 authored
      If slab order of first several pools was equal to zero,
      all these pools added to same group with pools with slab
      order is equal to one. It's leds to incorrect behavior
      of `smfree` function, because this function relies on
      same slab order size of all pools in mempool group.
      Fix this and add assertion and test to check it.
      
      Closes #6659
      173ce9fb
  6. Dec 06, 2021
    • Georgiy Lebedev's avatar
      box: fix tuple field count overflow handling · 33334f30
      Georgiy Lebedev authored
      Tuple field count overflow is not handled: before inserting, explicitly
      compare the current tuple size to box.schema.FIELD_MAX and set a newly
      introduced diagnostic message if overflow occurs.
      
      Closes #6198
      33334f30
    • Georgiy Lebedev's avatar
      msgpuck: bump optimization patch · e7b854a6
      Georgiy Lebedev authored
      Tests inserting fields into tuples, causing it to append lots of
      nil's, work unacceptably slow: optimize mp_next.
      
      Needed for #6198
      e7b854a6
    • Georgiy Lebedev's avatar
      vinyl: optimize deletion of compacted run files · 599f0c13
      Georgiy Lebedev authored
      On completion of compaction tasks we remove compacted run files created
      after the last checkpoint immediately to save disk space. In order to
      perform this optimization we compare the unused runs' dump LSN with the
      last checkpoint's one.
      
      But during replica's initial JOIN stage we set the LSN of all rows
      received from remote master to 0 (see
      box/box.cc/boostrap_journal_write). Considering that the LSN of an
      initial checkpoint is also 0, our optimization stops working, and we
      receive a huge disk space usage spike (as the unused run files will
      only get removed when garbage collection occurs).
      
      We should check the vinyl space engine's status and perform
      our optimization unconditionally if we are in replica's initial JOIN
      stage.
      
      Closes #6568
      599f0c13
    • Yaroslav Lobankov's avatar
      ci: simplify export of env variable in action · 08ca70fe
      Yaroslav Lobankov authored
      In the 'pack_and_deploy' action we have such a line:
      
          echo PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--init' | tee -a $GITHUB_ENV
      
      Usually, the `echo FOO=bar | tee -a $GITHUB_ENV` construction is used
      to propagate an env variable outside the action/step so it could be used
      in other actions/steps via ${{ env.FOO }} or $FOO.
      
      The 'PACKPACK_EXTRA_DOCKER_RUN_PARAMS' variable is used only inside the
      action and we can change the mentioned line to as follows:
      
          export PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--init'
      08ca70fe
    • Yaroslav Lobankov's avatar
      cd: use RWS instead of update_repo.sh script · 4689c95e
      Yaroslav Lobankov authored
      This patch introduces the use of RWS (repository web service) instead
      of old update_repo.sh script for uploading packages to S3 repositories.
      RWS fully replaces facilities of update_repo.sh + provides new features
      like support of uploading ARM packages. Also, it is very simple to use,
      just do `curl` to the RWS endpoint with some params and that's it.
      
      Closes #6482
      4689c95e
  7. Dec 03, 2021
    • Vladimir Davydov's avatar
      test: fix flaky box/func_reload test · 1b34d3d5
      Vladimir Davydov authored
      This commit fixes the following failure:
      
      ```
      --- box/func_reload.result        Fri Dec  3 15:15:05 2021
      +++ var/rejects/box/func_reload.reject    Fri Dec  3 15:15:12 2021
      @@ -202,11 +202,11 @@
       ...
       ch:get()
       ---
      +- [[2]]
      +...
      +ch:get()
      +---
       - [[1]]
      -...
      -ch:get()
      ----
      -- [[2]]
       ...
       s:drop()
       ---
      ```
      
      The function reloaded in this test yields, so there's no guarantee that
      the first reload completes before the second one. Fix this by discarding
      `ch:get()` result.
      
      Closes https://github.com/tarantool/tarantool-qa/issues/15
      1b34d3d5
    • Vladimir Davydov's avatar
      Revert "test: disable Lua JIT for net.box_reconnect_after_gh-3164" · d9b8c0db
      Vladimir Davydov authored
      This reverts commit 5546cde0.
      
      And remove the test from the flaky list. The test seems to have been
      fixed by commit c13b3a31 ("net.box:
      rewrite state machine (transport) in C").
      
      Closes #5081
      d9b8c0db
    • Aleksandr Lyapunov's avatar
      tools: add a script that checks submodules' commits · 7fcaf4d0
      Aleksandr Lyapunov authored
      Sometimes to fix an issue we need to patch our submodule, update it
      in tarantool and then patch tarantool using changes in submodule.
      
      During development and review stages we have to create a branch (S)
      in submodule and a branch (T) in tarantool that references head of
      (S) branch.
      
      When the fix is merged to mater it's very simple to make a mistake:
      merge-and-push submodule's branch S and then tarantool's branch T.
      It sounds obvious, but that's wrong: tarantool's master should
      reference a commit from submodule's master, not a commit from
      temporary developer's branch.
      
      It's not hard to fix it but still a maintainer must always remember
      that problem. In order to simplify their life it was decided to
      create a script that is designed to check such thing before pushing
      tarantool to origin/master.
      
      Here is it, with simple usage:
      ./tools/check_push_master.sh && git push origin master
      7fcaf4d0
  8. Dec 02, 2021
  9. Dec 01, 2021
Loading