Skip to content
Snippets Groups Projects
  1. May 06, 2022
    • Vladimir Davydov's avatar
      test: fix luatest server cleanup · 32250ed3
      Vladimir Davydov authored
      It doesn't work, because fio.rmtree doesn't accept wildcards.
      Let's delete the whole server working tree on cleanup.
      
      NO_DOC=test
      NO_CHANGELOG=test
      
      (cherry picked from commit 00d6dfcd)
      32250ed3
    • Vladimir Davydov's avatar
      fiber_cond: add static initializer · f576a182
      Vladimir Davydov authored
      Similar to RLIST_HEAD_INITIALIZER and RLIST_HEAD. Needed to initialize
      a global fiber_cond variable without calling fiber_cond_create.
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 0016e80a)
      f576a182
    • Vladimir Davydov's avatar
      schema: space upgrade fixes · 8970d93d
      Vladimir Davydov authored
       - Add func_id_by_name to box.internal. It will be used in EE.
       - Don't call box.internal.space.upgrade from box.schema.space.upgrade -
         we will redefine box.schema.space.upgrade in EE instead.
      
      Follow-up commit 38b25832 ("box: add space upgrade stubs").
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 44fadfc4)
      8970d93d
    • Yaroslav Lobankov's avatar
      ci: follow-up improvements for gc64 builds · 6e2fa5d2
      Yaroslav Lobankov authored
      This change contains the following improvements:
      
      1. Prettify view in the job list.
      
         Before:
           - centos_7 / centos_7 (GC64=OFF)
           - centos_7 / centos_7 (GC64=ON)
      
         After:
           - centos_7 / centos_7
           - centos_7 / centos_7 (gc64)
      
      2. Change possible values for the ${GC64} env variable to
         `true/false` instead of `ON/OFF` which is more traditional.
      
      3. Use `-DLUAJIT_ENABLE_GC64=ON` flag in the `debian/rules` and
         `rpm/tarantool.spec` files directly instead of providing it
         in the workflow files.
      
      Follows-up tarantool/tarantool-qa#159
      Follows-up tarantool/tarantool-qa#161
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit 63bedc76)
      6e2fa5d2
  2. May 05, 2022
  3. May 04, 2022
    • Nikita Pettik's avatar
      build: include extra directories for main.cc build · d5f7fd53
      Nikita Pettik authored
      main.cc includes some headers from Tarantool Enterpise (to be more precise -
      flightrec.h). To build it we should include proper extra directories.
      
      NO_DOC=<Build fix>
      NO_CHANGELOG=<Build fix>
      NO_TEST=<Build fix>
      
      (cherry picked from commit 3a0bb34d)
      d5f7fd53
    • Nikita Pettik's avatar
      prbuf: fix "wrong argument type" error · 726e818b
      Nikita Pettik authored
      ffi.typeof() returns cdata, which in turn can't be concatenated with string
      without explicit call of `tostring`. Moreover, passing data of native Lua
      type would also generate wrong error. So let's simply raise general error
      without mentioning passed type.
      
      NO_DOC=<Internal fix>
      NO_CHANGELOG=<Internal fix>
      
      (cherry picked from commit f715e36a)
      726e818b
    • Nikita Pettik's avatar
      box/iproto: introduce reqstart to iproto_msg · 52dbf751
      Nikita Pettik authored
      Previously we decided to pass `msg->p_inbuf->rpos` to flight recorder in
      order to dump request. However, this is wrong way to do it since `rpos`
      is moved only request has been processed, i.e. at the same moment several
      requests may have the same `rpos` value. To fix this let's save the start
      of unparsed request to `iproto_msg`. There's one detail that should be
      clarified to understand that in this case we'll always get valid
      pointer to ibuf. Imagine following state of ibuf:
      ```
      +_____________________
      |   |  |          |
      +---------------------
          ^  ^          ^
        RPOS R2       WPOS
         R1
      ```
      R1 is the first request in the buffer (i.e. rpos points to it);
      R2 is the second. One can argue that if R2 is processed faster than R1
      than during the dump of R1 its `reqstart` may point to the garbage.
      However, dump of request takes place at the bery beginning of request
      execution in TX thread. As far as messages are started to be processed
      exactly in the same way as they were received, then R1 will be always
      dumped before R2 and its further processing.
      
      Follow-up 247515e9
      
      NO_DOC=<No user visible changes>
      NO_TEST=<No functional changes>
      NO_CHANGELOG=<No functional changes>
      
      (cherry picked from commit da1892a9)
      52dbf751
    • Yaroslav Lobankov's avatar
      ci: enable gc64 builds for opensuse systems · 5212375d
      Yaroslav Lobankov authored
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit e73ca8a5)
      5212375d
    • Yaroslav Lobankov's avatar
      ci: enable gc64 builds for debian-like systems · 19b00751
      Yaroslav Lobankov authored
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit 0d27174d)
      19b00751
    • artembo's avatar
      ci: use separate repo for gc64 packages · 42cf5d37
      artembo authored
      
      It looks like the simplest solution to deliver gc64 tarantool builds
      is to have a separate repo for it. So this patch removes old stuff
      related to the 'tarantool-gc64' package and adds the new logic to
      store gc64 packages in a separate repo.
      
      Closes: tarantool/tarantool-qa#161
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      Co-authored-by: default avatarYaroslav Lobankov <y.lobankov@tarantool.org>
      
      (cherry picked from commit 16f47bdf)
      42cf5d37
    • Vladimir Davydov's avatar
      alter: fix space upgrade check · aaa72654
      Vladimir Davydov authored
      space_upgrade_check_alter() must be called after the new space
      definition is updated.
      
      Follow-up commit 38b25832 ("box: add space upgrade stubs").
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 34da4ce9)
      aaa72654
  4. Apr 29, 2022
  5. Apr 28, 2022
    • Vladimir Davydov's avatar
      errinj: add SPACE_UPGRADE_DELAY error injection · 8ee56df0
      Vladimir Davydov authored
      It will be used to stall background space upgrade in tests.
      
      While we are at it, move ERRINJ_TX_DELAY_PRIO_ENDPOINT to restore
      the sorted order of the error injection list.
      
      Follow-up commit 38b25832 ("box: add space upgrade stubs").
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit d772aef9)
      8ee56df0
    • Vladimir Davydov's avatar
      space_upgrade: pass format to space_upgrade_new · 30470af9
      Vladimir Davydov authored
      We need the new format to apply the upgrade function to a tuple.
      
      Follow-up commit 38b25832 ("box: add space upgrade stubs").
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 5269f2ea)
      30470af9
    • Vladimir Davydov's avatar
      test: check space upgrade stubs · 11704cd1
      Vladimir Davydov authored
      Follow-up commit 38b25832 ("box: add space upgrade stubs").
      
      NO_DOC=test
      NO_CHANGELOG=test
      
      (cherry picked from commit 764d18ab)
      11704cd1
    • Vladimir Davydov's avatar
      test: add skip_if_enterprise luatest helper · 5461326d
      Vladimir Davydov authored
      The helper skips a running test with luatest.skip_if in case executed by
      Tarantool Enterprise. It's better than checking the package directly in
      the test, because luatest.skip_if prints the reason why the test is
      skipped.
      
      NO_DOC=test
      NO_CHANGELOG=test
      
      (cherry picked from commit d2b216e8)
      5461326d
    • Vladimir Davydov's avatar
      func_cache: add space upgrade func holder type · 344acf07
      Vladimir Davydov authored
      Online space upgrade applies a function to all tuples in a space.
      The function should be pinned so we need a new holder type.
      
      Follow-up commit 38b25832 ("box: add space upgrade stubs").
      
      NO_DOC=internal
      NO_TEST=internal
      NO_CHANGELOG=internal
      
      (cherry picked from commit 98bb3bd4)
      344acf07
    • Vladimir Davydov's avatar
      opt_def: make opt_def::enum_strs const char *const * · b414dfb0
      Vladimir Davydov authored
      Enum keys are usually stored in a const array of const strings.
      Fix opt_def::enum_strs type accordingly.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 624076ba)
      b414dfb0
    • Vladimir Davydov's avatar
      field_def: pass char ** instead of char * to field_def_array_decode · 357a1af1
      Vladimir Davydov authored
      So that the caller can figure out the end of fields array without
      calling mp_next(). Needed for decoding space upgrade format.
      
      While we are at it, let's also
       - Replace MP_ARRAY assertion with diag_set. This makes the function
         easier to use when the MsgPack format isn't guaranteed to be
         MP_ARRAY.
       - Rearrange arguments so that [out] arguments are grouped together.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      
      (cherry picked from commit 78b0d83a)
      357a1af1
    • Yaroslav Lobankov's avatar
      ci: fix jepsen testing · dc251fdf
      Yaroslav Lobankov authored
      Fix the following error:
      
          {"badRequest": {"message": "The requested availability zone is not
          available", "code": 400}}
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      
      (cherry picked from commit 45bc9281)
      dc251fdf
    • Yaroslav Lobankov's avatar
      cmake: drop --vardir option when running tests · 07e75c62
      Yaroslav Lobankov authored
      This option very often makes tests fail due to the issue with the max
      length of socket paths (107 chars). Let's rely on the VARDIR environment
      variable or another default value (/tmp/t) when VARDIR is not defined.
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      
      (cherry picked from commit 96d7642e)
      07e75c62
    • Yaroslav Lobankov's avatar
      luatest: use /tmp/t as default socket dir · 1a65c7c4
      Yaroslav Lobankov authored
      This patch changes the length of default socket paths for luatest tests
      (when the VARDIR environment variable is not defined). It should reduce
      the chance for the issue with the max length of socket paths (107 chars)
      to happen.
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      
      (cherry picked from commit c90a227e)
      1a65c7c4
    • Yaroslav Lobankov's avatar
      ci: add VARDIR to PRESERVE_ENVVARS env variable · e8b61db8
      Yaroslav Lobankov authored
      This change adds VARDIR to the PRESERVE_ENVVARS environment variable
      to deliver it to 'packpack' docker containers while running packaging
      workflows.
      
      NO_DOC=ci
      NO_CHANGELOG=ci
      NO_TEST=ci
      
      (cherry picked from commit 7ae22101)
      e8b61db8
    • Yaroslav Lobankov's avatar
      ci: change value for VARDIR env variable to /tmp/t · a0ef0026
      Yaroslav Lobankov authored
      This patch changes the length of socket paths for tests by 2 chars.
      It should reduce the chance for the issue with the max length of socket
      paths (107 chars) to happen.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      (cherry picked from commit f483eac0)
      a0ef0026
    • Yaroslav Lobankov's avatar
      test-run: bump to new version · da9212e4
      Yaroslav Lobankov authored
      Bump test-run to new version with the following changes:
      
      - Change default value for `vardir` option [1]
      - Read default value for `vardir` option from env [1]
      
      [1] tarantool/test-run#338
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      
      (cherry picked from commit 60abb06d)
      da9212e4
  6. Apr 26, 2022
    • Kirill Yukhin's avatar
      Fix changelog typos · 967e4920
      Kirill Yukhin authored
      There were some garbage in 2.10.0-rc1 changelog.
      
      NO_DOC=no code changes
      NO_TEST=no code changes
      967e4920
  7. Apr 25, 2022
    • Kirill Yukhin's avatar
      Generate changelog for 2.10.0-rc1 · 7ed15e62
      Kirill Yukhin authored
      Generate changelog for 2.10 release series.
      
      NO_DOC=no code changes
      NO_TEST=no code changes
    • Mons Anderson's avatar
      clock: return signed ints from time64 functions · fea8c8e4
      Mons Anderson authored
      Changed return value type in Lua for the following functions from
      `uint64_t` to `int64_t`:
      
      * clock.time64
      * clock.realtime64
      * clock.monotonic64
      * clock.process64
      * clock.thread64
      * fiber.time64
      * fiber.clock64
      
      Changed return value type in Module API for the following functions from
      `uint64_t` to `int64_t`:
      
      * fiber_time64
      * fiber_clock64
      
      Also enhanced clock.test.lua tap test with more testcases
      
      Due to unsigned values returned from time64 family function time
      calculations may lead to undesired value overflows. Having two 64-bit
      timestamps I cannot just subtract them without prior comparison. It is
      used often, for example when calculating time to a deadline (in queues
      or for expiration).
      
      Let's measure time, that pass between two sequential clock.time calls:
      
      ```lua
      print(clock.time() - clock.time()) -- -9.5367431640625e-07
      ```
      
      It's ok, with double type time return, but what about 64-bit integers?
      
      ```
      print(clock.time64() - clock.time64()) -- 18446744073709550616
      ```
      
      It returns weird integer overflow instead of expected `-1000`
      
      This is counterintuitive and gets conflicted with every time functions
      from system headers (which are always signed).
      
      If we consider some hypothetical code, that waits some time for a
      deadline, then instead of exiting loop, this code will go to "infinite"
      (actually 585 years) wait in the case when the deadline was passed.
      
      ```lua
      do
      local ts = clock.time64() + 1e9 -- some_timestamp_in_future, ex: now+1s
      -- ...
      local remaining = clock.time64() - ts
      -- ...
      if remaining > 0 then
          fiber.sleep( tonumber(remaining/1e9) )
      end
      print "1 second passed"
      end
      ```
      
      This is hard to notice (in real tests deadlines are always in the
      future), but in a real environment and under high load such cases occur.
      
      1. Since Lua functions will return ffi.typeof `ctype<int64_t>` instead
         of old `ctype<uint64_t>` any code, that uses _strict_ ffi type check
         will fail. But I hardly believe such code ever exists.
      2. Low-level Module API also changed, and code, which compiles with
         `-Werror` may also fail. This could be an issue and in such a case we
         may remove the update of module API change. Still, I consider this
         change reasonable, since all C-level API uses signed time values.
      
      @TarantoolBot document
      Title: Return type of time64 functions is changed
      
      These C functions in the public API used to return `uint64_t`, now they
      return `int64_t`: `clock_realtime64`, `clock_monotonic64`,
      `clock_process64`, `clock_thread64`, `fiber_time64()`,
      `fiber_clock64()`.
      
      These Lua functions used to return cdata of type `uint64_t`, now they
      return cdata of type `int64_t`: `fiber.time64()`, `fiber.clock64()`.
      fea8c8e4
    • Valeria Khokha's avatar
      doc: proofread changelogs/unreleased · 55cd16b5
      Valeria Khokha authored
      
      Fix wording, punctuation, and formatting.
      Fix dashes, trailing whitespaces, indentation, and file names.
      
      Needed for: #6430
      
      NO_DOC=changelog
      NO_TEST=changelog
      
      Co-authored-by: default avatarValeria Khokha <valeria.khokha@gmail.com>
      Co-authored-by: default avatarKseniia Antonova <xuniq.is.here@gmail.com>
      55cd16b5
    • Maxim Kokryashkin's avatar
      luajit: bump new version · c6b038b0
      Maxim Kokryashkin authored
      LuaJIT submodule is bumped to introduce the following changes:
      * GC64: disable sysprof support
      * build: make -DLUAJIT_DISABLE_SYSPROF work
      * test: disable sysprof C API tests with backtrace
      * tools: introduce parsers for sysprof
      * sysprof: introduce Lua API
      * memprof: add profile common section
      * core: introduce lua and platform profiler
      * memprof: move symtab to a separate module
      * core: separate the profiling timer from lj_profile
      * vm: save topframe info into global_State
      
      Within this changeset a parser for binary data dumped via the sampling
      profiler to Tarantool binary. It is a set of the following Lua modules:
      * sysprof/parse.lua: decode the sampling profiler event stream
      * sysprof/collapse.lua: collapse stacks obtained while profiling
      * sysprof.lua: Lua script and module to display data
      
      Besides, all new public Lua C API introduced within this changeset is
      added to extra/exports.
      
      Closes #781
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      c6b038b0
    • artembo's avatar
      ci: build Tarantool with enabled gc64 · 4af8e8d6
      artembo authored
      To make tarantool-gc64 available in repository we need to provide
      a product name in a package itself and in the repository.
      
      To build Tarantool with gc64 enabled, the flag -DLUAJIT_ENABLE_GC64
      needs to be passed to cmake flags. For this purposes GC64 env var
      was added to all workflows for Debian, Ubuntu, Centos and Fedora.
      
      This variable is processed to rename PRODUCT_NAME. If GC64 is
      eanbled, PRODUCT_NAME is `tarantool-gc64`, otherwise it stays
      `tarantool`, which goes to repository name and the package itself.
      Thus, Tarantool with gc64 enabled can be installed by
      `<packaen_manager> install -y tarantool-gc64`
      in the one single repository.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      Closes: tarantool/tarantool-qa#161
      4af8e8d6
    • Sergey Bronnikov's avatar
      third_party: update libcurl from 7.76.0 to 7.80.0 · a353ec91
      Sergey Bronnikov authored
      Changelog: https://curl.se/changes.html#7_80_0
      
      NO_DOC=libcurl submodule bump
      NO_CHANGELOG=libcurl submodule bump
      NO_TEST=libcurl submodule bump
      
      Closes: #6029
      Closes: https://github.com/tarantool/security/issues/10
      a353ec91
    • Nikita Pettik's avatar
      box: add OS stubs for flight recorder requests · 247515e9
      Nikita Pettik authored
      This patch introduces two stubs: one to log incoming requests and
      another one to log outgoing responses. Log itself takes place in TX
      thread, in function family `tx_process_*`. At the start of TX processing
      we are able to use raw msgpack from input buffer to log it as it was
      received. In the same way we can log raw msgpack for responses (before
      sending message to IProto thread).
      
      NO_DOC=<No user visible changes>
      NO_TEST=<No functional changes>
      NO_CHANGELOG=<No functional changes>
      247515e9
    • Nikita Pettik's avatar
      iproto: pass to tx_end_msg() start of response · 211a3bfb
      Nikita Pettik authored
      It may turn out to be useful having output buffer savepoint pointing to
      the start of response. Using it one can restore the whole encoded IProto
      response. For instance, to dump it to auxiliary logs.
      
      NO_DOC=<No user visible changes>
      NO_TEST=<No functional changes>
      NO_CHANGELOG=<No functional changes>
      211a3bfb
    • Nikita Pettik's avatar
      box: add OS stubs for flight recorder metrics · ba47b766
      Nikita Pettik authored
      Let's add no-op interface functions and box cfg default parameters.
      
      NO_DOC=<No user visible changes>
      NO_TEST=<No functional changes>
      NO_CHANGELOG=<No functional changes>
      ba47b766
    • Nikita Pettik's avatar
      box: add OS stubs for flight recorder logger · e96d7847
      Nikita Pettik authored
      Let's add no-op interface functions and box cfg default parameters.
      
      NO_DOC=<No user visible changes>
      NO_TEST=<No functional changes>
      NO_CHANGELOG=<No functional changes>
      e96d7847
    • Nikita Pettik's avatar
      say: introduce on_log callback · 0483ace2
      Nikita Pettik authored
      It can be used for instance to duplicate logs somewhere. In particular
      case it is going to be used for flight recorder.
      
      NO_DOC=<No user visible changes>
      NO_TEST=<No functional changes>
      NO_CHANGELOG=<No functional changes>
      0483ace2
    • Nikita Pettik's avatar
      lua/prbuf: introduce entry:data() method · de90e54b
      Nikita Pettik authored
      prbuf entry contains pointer to raw memory (char *) and its length.
      Let's introduce :data() methods which would convert this memory chunk
      to Lua string.
      
      NO_DOC=<Feature for internal usage>
      NO_CHANGELOG=<Feature for internal usage>
      de90e54b
Loading