Skip to content
Snippets Groups Projects
  1. Nov 17, 2022
    • Andrey Saranchin's avatar
      iproto: add pagination options to iproto · 948e5cdc
      Andrey Saranchin authored
      The patch adds new iproto keys needed for pagination and extends
      tx_process_select, used by IPROTO. IPROTO and NETBOX_IPROTO versions
      are updated, iproto feature pagination is introduced, new keys are:
      
      0x2e - IPROTO_AFTER_POSITION - start iteration after passed
      iterator position. It has type MP_STR.
      
      0x2f - IPROTO_AFTER_TUPLE - start iteration after passed tuple.
      It has type MP_ARRAY.
      
      0x1f - IPROTO_FETCH_POSITION - send position of last fetched tuple
      in response. It has type MP_BOOL.
      
      0x35 - IPROTO_POSITION - iterator position, sent in response if
      IPROTO_FETCH_POSITION is true. It has type MP_STR.
      
      Part of #7637
      
      NO_CHANGELOG=see later commits
      NO_DOC=see later commits
      948e5cdc
  2. Nov 15, 2022
    • Ilya Verbin's avatar
      coro: update sp before saving registers to a stack frame · 215630e6
      Ilya Verbin authored
      Currently AArch64 version of coro_transfer stores x19-x30 and d8-d15
      registers to the stack, but only after that it updates the stack pointer.
      If a SIGALRM signal is delivered during the execution of coro_transfer,
      the signal handler will use the stack starting from current sp, thus
      corrupting the saved registers.
      
      Fix this by updating the stack pointer at the beginning of coro_transfer.
      x2 register is still required, because `str sp, [x0, #0]` is invalid in
      the A64 instruction set.
      
      Closes #7484
      Closes #7523
      
      NO_DOC=bugfix
      NO_TEST=Hard to create a stable reproducer,
              mostly covered by existing tests.
      215630e6
  3. Nov 11, 2022
    • Sergey Bronnikov's avatar
      lua: use https protocol in a crash report message · bab289cd
      Sergey Bronnikov authored
      NO_DOC=fix protocol in link
      NO_TEST=fix protocol in link
      NO_CHANGELOG=fix protocol in link
      bab289cd
    • Vladimir Davydov's avatar
      test: fix flaky box-luatest/gh_7917_log_row_on_recovery_error_test · 3d3e9dea
      Vladimir Davydov authored
      The test fails with:
      
        master | 2022-11-11 09:03:32.093 [4128822] main/103/default.lua F>
        can't initialize storage: unlink, called on fd 30, aka unix/:(socket),
        peer of unix/:(socket): Address already in use
      
      Looks like it happens, because both test cases share the socket path.
      The fix is the same as in commit 3f86cd04 ("test: fix flaky
      'test_ignore_with_force_recovery'") - use different socket paths.
      
      Follow-up commit b2dab5f4 ("memtx: log bad row on snapshot recovery
      error").
      
      NO_DOC=test fix
      NO_CHANGELOG=test fix
      3d3e9dea
    • Igor Munkin's avatar
      luajit: bump new version · 2acac734
      Igor Munkin authored
      * ci: add workflow for legacy CMake GNU Make build
      * build: fix build with the original Makefile
      * ci: drop integration for macOS with disabled GC64
      * ci: add 'self-hosted' tag to runs-on
      * ci: use Ninja generator in CI workflows
      * ci: use CMAKE_EXTRA_PARAMS in LuaJIT integration
      * test: replace result variable in MakeLuaPath.cmake
      * ci: merge Linux and macOS workflows
      * ci: merge x86_64 and ARM64 workflows
      * ci: remove arch prefix for macOS M1 workflow
      * ci: remove excess parallel level setup
      * ci: use out of source build in GitHub Actions
      * test: fix tarantool suite for out of source build
      * test: introduce MakeLuaPath.cmake helper
      * test: introduce utils.profilename helper
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bum
      NO_CHANGELOG=ci
      2acac734
  4. Nov 10, 2022
    • Serge Petrenko's avatar
      relay: fix loss of one of the two consecutive heartbeats · 2cf411b0
      Serge Petrenko authored
      When replica heartbeat is read while another heartbeat is en route, it's
      delivery is delayed for a full replication_timeout.
      
      This can be seen in replication/qsync_basic.test.lua occasional hangs on
      these lines:
      ```
      --
      -- gh-5100: replica should send ACKs for sync transactions after
      -- WAL write immediately, not waiting for replication timeout or
      -- a CONFIRM.
      --
      -- on replica:
      box.cfg{replication_timeout = 1000, replication_synchro_timeout = 1000}
      test_run:switch('default')
      box.cfg{replication_timeout = 1000, replication_synchro_timeout = 1000}
      <factored-out>
      -- Now commit something sync. It should return immediately even
      -- though the replication timeout is huge.
      box.space.sync:replace{4}
      
      ```
      
      Change that so a pending heartbeat is sent immediately upon status
      message return from tx thread.
      
      Closes #7869
      
      NO_TEST=hard to test
      NO_DOC=bugfix
      NO_CHANGELOG=not user-visible
      2cf411b0
    • Igor Munkin's avatar
      ci: add 'self-hosted' tag to runs-on section · a8b95d09
      Igor Munkin authored
      
      Fun fact: our self-hosted macOS runner has the same name as the one
      provided by GitHub. Hence sometimes when no self-hosted runners are
      available, the public GitHub one is chosen.
      
      This patch enforces LuaJIT integration workflow to use only self-hosted
      runner by explicitly specifying this in runs-on section.
      
      NO_DOC=ci
      NO_TEST=ci
      NO_CHANGELOG=ci
      
      Reviewed-by: default avatarYaroslav Lobankov <y.lobankov@tarantool.org>
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      a8b95d09
    • Vladimir Davydov's avatar
      memtx: log bad row on snapshot recovery error · b2dab5f4
      Vladimir Davydov authored
      We log bad row on xlog recovery error. We should log bad row on snapshot
      recovery error ase well to ease debugging.
      
      Closes #7917
      
      NO_DOC=bug fix
      b2dab5f4
    • Gleb Kashkin's avatar
      lua/fio: clearer error msg for pread() · 22ecf87a
      Gleb Kashkin authored
      fh:pread() will raise a clear error on wrong arguments.
      
      Closes #4963
      
      NO_DOC=bugfix
      NO_CHANGELOG=bugfix
      22ecf87a
  5. Nov 09, 2022
  6. Nov 08, 2022
    • Andrey Saranchin's avatar
      box: rework iterator_position entity · a62e14a0
      Andrey Saranchin authored
      There is a big caveat in current implementation of position - it is
      represented as a string with unprintable chars in Lua - if user will
      need to save it to another database or pass to another client,
      unprintable chars can be affected. That is why we decided to redesign
      position entity - now it is just a key with MP_ARRAY header, encoded to
      base64 format.
      
      NO_CHANGELOG=redesign of unreleased feature
      NO_DOC=later
      
      Part of #7639
      a62e14a0
    • Andrey Saranchin's avatar
      box: return no position on empty page when offset is used · 04bc54ed
      Andrey Saranchin authored
      When pagination is used with offset and returns no tuples while several
      tuples were actually skipped by offset, iterator has non-NULL position,
      that is why select returns non-empty position. Let's check if resulting
      tuples were actually found before return position.
      
      NO_CHANGELOG=bugfix for unreleased feature
      NO_DOC=bugfix
      
      Part of #7639
      04bc54ed
    • Vladimir Davydov's avatar
      build: add EXTRA_API_HEADERS variable · a80b77f7
      Vladimir Davydov authored
      The module API header (module.h) is generated automatically by
      extracting everything between '\cond public' and '\endcond public'
      from headers listed in the api_headers CMake variable. We're
      planning to extend the module API in Tarantool EE. To achieve that,
      this commit includes all files listed in the new CMake variable
      EXTRA_API_HEADERS into api_headers.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/265
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      a80b77f7
  7. Nov 07, 2022
    • Georgiy Lebedev's avatar
      test: add test for replacement of absolute paths in diagnostics (#7808) · ffb17a55
      Georgiy Lebedev authored
      Since this feature is compiler-dependent, we need to skip the test if the
      server was build with a compiler that does not support the
      `-fmacro-prefix-map` flag.
      
      Follow-up #7808
      
      NO_CHANGELOG=test
      NO_DOC=test
      NO_TEST=test
      ffb17a55
    • Georgiy Lebedev's avatar
      build: store compiler ID and version in `COMPILER_INFO` · aec0393e
      Georgiy Lebedev authored
      Currently, `tarantool.build.compiler` stores the `CMAKE_C_COMPILER` and
      `CMAKE_CXX_COMPILER` strings from CMake, which are basically paths to the
      compiler used for build, and are usually set to `/usr/bin/cc` and
      `/usr/bin/c++` accordingly, which does not yield any useful information:
      instead, set it to `${CMAKE_C_COMPILER_ID}-${CMAKE_C_COMPILER_VERSION}`,
      assuming the same compiler is used for building C and C++.
      
      Closes #7888
      
      @TarantoolBot document
      Title: change of information shown in compiler information
      Compiler information provided by `tarantool --version` and
      `tarantool.build.compiler` now show
      `${CMAKE_C_COMPILER_ID}-${CMAKE_C_COMPILER_VERSION}` instead of paths to C
      and C++ compilers used to build tarantool, for instance:
      
      ```console
      tarantool> tarantool.build.compiler
      
      ---
      - Clang-14.0.0.14000029
      ...
      
      tarantool> tarantool.build.compiler
      
      ---
      - GNU-12.2.0
      ...
      ```
      aec0393e
    • Georgiy Lebedev's avatar
      build: revert usage of relative paths in debugging information · 41c7db41
      Georgiy Lebedev authored
      The `-Wa,--debug-prefix-map` compiler flag breaks GNU-based LTO, and also
      we cannot reliably test this feature.
      
      Follow-up 256da010
      
      NO_CHANGELOG=bugfix
      NO_DOC=bugfix
      NO_TEST=bugfix
      41c7db41
    • Mergen Imeev's avatar
      box: rework index_def_is_valid() · 5df76ade
      Mergen Imeev authored
      This patch renames index_def_is_valid() to index_def_check() and makes
      it return 0 or -1 because that function sets a diag.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      5df76ade
    • Mergen Imeev's avatar
      sql: throw error on creation of too many indexes · 2705e227
      Mergen Imeev authored
      Prior to this patch, there was no error of creating too many indexes in
      SQL. This led to a situation where indexes with IDs greater than
      BOX_INDEX_MAX were not created, but no error was thrown. For example, in
      the case of CREATE TABLE, only indexes with an ID less than
      BOX_INDEX_MAX were created. Now an error is thrown when creating too
      many indexes.
      
      Closes #5526
      
      NO_DOC=bugfix
      2705e227
    • Mergen Imeev's avatar
      sql: reset autoincrement IDs before execution · 5eefa06f
      Mergen Imeev authored
      After this patch, the list of auto-increment IDs will be reset before
      executing the prepared statement.
      
      Closes #6422
      
      NO_DOC=bugfix
      5eefa06f
    • Mergen Imeev's avatar
      sql: fix error with new field in new index · 440a0f8c
      Mergen Imeev authored
      In case the space format is changed after inserting tuples, the new
      format contains new fields, and a new index is created that works with
      those new fields, it is possible to get an assertion during SELECT. This
      problem was fixed in this path.
      
      Closes #5183
      
      NO_DOC=bugfix
      440a0f8c
    • Sergey Ostanevich's avatar
      test: fix flakiness of replication/qsync_basic · 0fbdfd0f
      Sergey Ostanevich authored
      The async transactions should always wait for LSN from the master after
      switch to replica.
      
      Closes tarantool/tarantool-qa#274
      
      NO_CHANGELOG=testing
      NO_DOC=testing
      0fbdfd0f
  8. Nov 03, 2022
  9. Nov 02, 2022
    • Timur Safin's avatar
      debugger: gracefully handle nil values · d1111c8b
      Timur Safin authored
      Appeared that ASAN build could return nil values from child
      process executed via popen. Which sporadically produces
      error messages:
      
        not ok 1 ..console_debugger_session.test_interactive_debugger_session
        #   ...ntool/test/app-luatest/console_debugger_session_test.lua:11:
        # attempt to index local 's' (a nil value)
        #   stack traceback:
      
      Due to used timeouts we are ok to receive nil at one of a loop
      cycle - we simply repeat read to popen object. So handle this
      case gracefully.
      
      NO_DOC=bugfix
      NO_CHANGELOG=internal
      d1111c8b
    • Gleb Kashkin's avatar
      test: remove outdated sql-tap test · e10f40b9
      Gleb Kashkin authored
      SQL select1:1-8.4 test didn't have any rationale in modern tarantool SQL
      and had been turned off since 2017.
      
      Closes: #5737
      NO_DOC=test
      NO_CHANGELOG=test
      e10f40b9
    • Vladimir Davydov's avatar
      say: enable json log format with syslog · ec1747b4
      Vladimir Davydov authored
      All the heavy lifting was done in the previous commit that dropped
      the syslog formatter. This commit just removes the checks that forbid
      using syslog with json.
      
      Closes #7860
      
      @TarantoolBot document
      Title: JSON log format can now be used with syslog
      
      The configuration reference says that syslog is incompatible with
      the JSON log format:
      
      https://www.tarantool.io/en/doc/latest/reference/configuration/#confval-log_format
      
      This isn't true anymore. If JSON is used with syslog, then a JSON
      message body is appended to the syslog header.
      
      See https://github.com/tarantool/tarantool/issues/7860.
      ec1747b4
    • Vladimir Davydov's avatar
      say: get rid of syslog formatter · 11ac72bd
      Vladimir Davydov authored
      All messages written to syslog must have a header, which contains the
      current time, message severity, and process identity, so we have a
      special formatter function for syslog. As a result, the syslog log
      destination is incompatible with the json log format, which has its own
      formatter function. This is confusing, because there's nothing that
      prevents us from writing json in the log entry body to syslog - we just
      need to prepend the message with a proper header.
      
      As a preparation for befriending json and syslog, let's get rid of the
      syslog formatter function and instead write the header right in log_vsay
      in case logs are written to syslog. We just need to strip the duplicate
      information from the log entry in say_format_plain so as not to print
      the time and pid twice.
      
      Needed for #7860
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      11ac72bd
    • Vladimir Davydov's avatar
      say: add helper function to get current time · dd825873
      Vladimir Davydov authored
      We have three places in say.c where we peform exactly the same steps to
      obtain the current time. Let's add a helper function to avoid code and
      comments duplication.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      dd825873
    • Vladimir Davydov's avatar
      say: rename buf to say_buf · 0920ab39
      Vladimir Davydov authored
      It's a global althoug static variable so better use say_ prefix so as
      not to mix it with a local variable.
      
      NO_DOC=refactoring
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      0920ab39
    • Yaroslav Lobankov's avatar
      test: use luatest modules instead of internal ones · 54bd77ad
      Yaroslav Lobankov authored
      Some internal modules have been recently copied to luatest repo [1,2,3]
      and now they can be safely removed, and the corresponding functionality
      from luatest can be used instead.
      
      Affected modules:
      
      - test/luatest_helpers/misc.lua
      - test/luatest_helpers/fiber.lua
      - test/luatest_helpers/proxy/*
      
      [1] https://github.com/tarantool/luatest/pull/247
      [2] https://github.com/tarantool/luatest/pull/248
      [3] https://github.com/tarantool/luatest/pull/255
      
      Closes tarantool/luatest#238
      Closes tarantool/luatest#251
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      54bd77ad
    • Yaroslav Lobankov's avatar
      test: bump test-run to version w/ updated luatest · 002b1ffc
      Yaroslav Lobankov authored
      Bump test-run to new version with the following improvements:
      
      - Bump luatest to 0.5.7-6-gee1f5c1 [1]
      - Fix detection of debug builds [2]
      
      [1] https://github.com/tarantool/test-run/pull/354
      [2] https://github.com/tarantool/test-run/pull/356
      
      Part of tarantool/luatest#238
      Part of tarantool/luatest#251
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      002b1ffc
    • Timur Safin's avatar
      debugger: provide access to box lua sources · f32808f9
      Timur Safin authored
      tarantool.debug.getsources() used to provide
      lua sources only for libserver lua modules,
      and was not providing sources for src/box/lua/*
      modules.
      
      Now this code works:
      ```lua
      local tnt = require 'tarantool'
      local code1 = tnt.debug.getsources('box/session')
      local code1 = tnt.debug.getsources('@builtin/box/session..lua')
      ```
      
      Closes #7839
      
      NO_DOC=bugfix
      NO_CHANGELOG=later
      f32808f9
Loading