Skip to content
Snippets Groups Projects
  1. Mar 02, 2023
    • Ilya Verbin's avatar
      main: fix wrong log level printed at first box.cfg{} · 861d6ae7
      Ilya Verbin authored
      The `log_level' configuration parameter can be set as a number or a string.
      When it is a string, cfg_geti() returns 0. Use log_default->level instead,
      which is initialized earlier during box_init_say().
      
      Closes #8287
      
      NO_DOC=bugfix
      NO_CHANGELOG=minor bug
      
      (cherry picked from commit 41ead021)
      861d6ae7
    • Mergen Imeev's avatar
      sql: fix assertion in case FK or CK declared first · 3a10085b
      Mergen Imeev authored
      This patch fixes an assertion or segmentation error if a FOREIGN KEY or
      CHECK constraint is declared before the first column.
      
      Closes #8392
      
      NO_DOC=bugfix of the bug added in the current release
      NO_CHANGELOG=bugfix of the bug added in the current release
      3a10085b
    • Serge Petrenko's avatar
      replication: add remote peer connection timeout · 03d3362d
      Serge Petrenko authored
      We use coio_connect() to connect the replica to a remote peer. It
      implies no timeout, and does a non-blocking connect() to the peer and
      then waits for the socket to become writable indefinitely.
      
      When the remote peer changes its IP address, connect() might try
      connecting to the old address for as long as ~ 2 minutes (given the
      default tcp_syn_retries value of 6).
      
      This blocks replica from trying to reconnect to the updated address and
      is pretty inconvenient.
      
      Let's use coio_connect_timeout() instead and use
      replication_disconnect_timeout() as a timeout, like everywhere else in
      master-replica communication.
      
      Closes #7294
      
      NO_DOC=bugfix
      
      (cherry picked from commit 0486a489)
      03d3362d
    • Yaroslav Lobankov's avatar
      test: add cleanup to digest_crc32_recording_test · dd421b0f
      Yaroslav Lobankov authored
      Add missing `server:drop()` to digest_crc32_recording_test.lua to avoid
      running tarantool processes after the test.
      
      NO_DOC=test fix
      NO_TEST=test fix
      NO_CHANGELOG=test fix
      
      (cherry picked from commit 5cbb0daf)
      Unverified
      dd421b0f
    • Vladimir Davydov's avatar
      test: fix gh_7974_force_recovery_bugs flaky test · 971266d7
      Vladimir Davydov authored
      The test fails with
      
       fail | 2023-03-01 15:54:30.550 [3724975] main/103/server_instance.lua
       F> can't initialize storage: unlink, called on fd 63,
       aka unix/:(socket), peer of unix/:(socket): Address already in use
      
      We fixed a similar issue in commit 3d3e9dea ("test: fix flaky
      box-luatest/gh_7917_log_row_on_recovery_error_test") by using unique
      instance names. Let's do the same here.
      
      Fixes commit b1095c1c ("memtx: fix force recovery handling").
      Follow-up #7974
      
      NO_DOC=test
      NO_CHANGELOG=test
      
      (cherry picked from commit 1490228a)
      971266d7
  2. Mar 01, 2023
    • Georgiy Lebedev's avatar
      memtx: fix force recovery handling · 3d71f7df
      Georgiy Lebedev authored
      Force recovery needs to follow the following logic: any unsuccessful system
      space request must make recovery fail (including failure to decode an xrow,
      when we are not sure we have finished processing system space request). If
      the request is a non-insert one (e.g., raft or synchro) or addresses a user
      space, it means we have finished processing system space requests, and from
      this moment force recovery can be enabled — change the behaviour
      accordingly.
      
      We assume the request order in the snapshot is the following:
      1. system space requests;
      2. user space requests;
      3. non-insert requests (e.g., raft or synchro).
      
      Refactor the force recovery logic: add a enumeration to track snapshot
      recovery state and add a new diagnostic for the case when the snapshot
      contains has no system spaces.
      
      Closes #7974
      
      NO_DOC=bugfix
      
      (cherry picked from commit b1095c1c)
      3d71f7df
    • Georgiy Lebedev's avatar
      box: add `space_id_is_system` helper · a4a80d00
      Georgiy Lebedev authored
      In some cases we don't have the whole space struct, but we want to
      determine whether the provided space identifier corresponds to a system
      space — add a `space_id_is_system` helper and refactor `space_is_system` to
      reuse it.
      
      Needed for #7974
      
      NO_CHANGELOG=refactoring
      NO_DOC=refactoring
      NO_TEST=refactoring
      
      (cherry picked from commit 928e5733)
      a4a80d00
    • Vladimir Davydov's avatar
      git: mark snap and xlog files as binary · b5114553
      Vladimir Davydov authored
      We often commit snap/xlog files for tests. A snap/xlog file is binary,
      but it contains a plain text header and, as a result, may be identified
      as a text file by git, which would enable checkpatch checks for it.
      Apparently, we don't need to check these files so let's force git to
      identify them as binary.
      
      NO_DOC=git
      NO_TEST=git
      NO_CHANGELOG=git
      
      (cherry picked from commit 24dd505f)
      b5114553
    • Sergey Bronnikov's avatar
      httpc: add a test with decoding using a custom body decoder · 5dcf3114
      Sergey Bronnikov authored
      Follows up #8363
      
      NO_CHANGELOG=see previous commit
      NO_DOC=added a test
      
      (cherry picked from commit cccd1f9a)
      Unverified
      5dcf3114
    • Sergey Bronnikov's avatar
      httpc: add a decoders to a http response · cf396115
      Sergey Bronnikov authored
      Patch fixes a bug when body in response couldn't be decoded:
      
      NO_WRAP
      ```
      tarantool> httpc = require('http.client').new()
      tarantool> response = httpc:get('https://jsonplaceholder.typicode.com/todos/1'
      
      )
      tarantool> response:decode()
      
      ---
      - error: 'builtin/http.client.lua:301: attempt to index field ''decoders'' (a nil
          value)'
      ...
      ```
      NO_WRAP
      
      Now response object contains table with decoders defined by user in his
      http client instance. We hide this table on response serialization by
      adding underscore because decoders there is not a part of API.
      
      Reported-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      
      Fixes #8363
      
      NO_DOC=bugfix
      
      (cherry picked from commit 83168b25)
      Unverified
      cf396115
    • Igor Munkin's avatar
      luajit: bump new version · f0f9d452
      Igor Munkin authored
      * test: make skipcond helper more convenient
      * test: introduce test:skiprest TAP helper
      * test: introduce test:skipall TAP helper
      * test: stop using utils.selfrun in tests
      * ci: use LuaJIT-test target in testing workflows
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      NO_CHANGELOG=test
      f0f9d452
  3. Feb 27, 2023
  4. Feb 22, 2023
  5. Feb 20, 2023
    • Kirill Yukhin's avatar
      Generate changelog for 2.11.0-rc1 · a989cd41
      Kirill Yukhin authored
      NO_DOC=no code changes
      NO_TEST=no code changes
      NO_CHANGELOG=no code changes
    • Pavel Semyonov's avatar
      doc: proofread 2.11.0-rc changelogs, part 3 · 77be138d
      Pavel Semyonov authored
      Proofread changelogs for 2.11.0-rc, part 3
      Fix grammar, punctuation, and wording
      
      NO_CHANGELOG=changelog
      NO_DOC=changelog
      NO_TEST=changelog
      77be138d
    • Alexander Turenko's avatar
      changelog: drop changelogs from 2.10 changes · 65f3bb78
      Alexander Turenko authored
      There is no sense to add description of changes that will be present as
      part of 2.10.5 into 2.11.0-rc1 release notes. Let's base the changes
      list on current 2.10 (future 2.10.5).
      
      Follows up commit 4d95d1e2 ("Cleanup released changelogs").
      
      NO_DOC=no code changes, just changelogs
      NO_TEST=see NO_DOC
      65f3bb78
    • Vladimir Davydov's avatar
      test: fix app-luatest/console_debugger_session_test for EE · 2bf0ceb9
      Vladimir Davydov authored
      In Tarantool EE the version string is "Tarantool Enterprise", not just
      "Tarantool".
      
      Fixes commit a984fc0d ("debugger: use option -d for debugger
      activation")
      
      NO_DOC=test
      NO_CHANGELOG=test
      2bf0ceb9
    • Vladimir Davydov's avatar
      lua/fiber: add compat option for default slice · 6fa6e212
      Vladimir Davydov authored
      The new compat option 'fiber_slice_default' is added to control
      the default value of the max fiber slice. The old default is no limit
      (both warning and error slice equals TIMEOUT_INFINITY). The new default
      is {warn = 0.5, err = 1.0}.
      
      Follow-up #6085
      
      NO_DOC=tarantool/doc#3057
      NO_CHANGELOG=unreleased
      6fa6e212
    • Vladimir Davydov's avatar
      lua/fiber: add max slice to fiber info · 448c3a05
      Vladimir Davydov authored
      This commit adds the new field 'max_slice' to fiber.info() that reports
      the max slice applied to the given fiber. The value is a table with two
      fields: 'err' for error slice and 'warn' for warning slice. Values
      greater than or equal to TIMEOUT_INFINITY aren't reported.
      
      Follow-up #6085
      
      NO_DOC=tarantool/doc#3057
      NO_CHANGELOG=unreleased
      448c3a05
    • Vladimir Davydov's avatar
      lua/fiber: improve error message raised on invalid slice · 3ad578d4
      Vladimir Davydov authored
      Error messages raised when an invalid slice is specified are confusing:
      
        tarantool> fiber = require('fiber')
        ---
        ...
      
        tarantool> fiber.set_max_slice('foo')
        ---
        - error: slice must be a table or a number
        ...
      
        tarantool> fiber.set_max_slice({})
        ---
        - error: 'bad argument #3 to ''?'' (number expected, got nil)'
        ...
      
      Let's change the error message to "slice must be a number or a table
      {warn = <number>, err = <number>}".
      
      Follow-up #6085
      
      NO_DOC=undocumented
      NO_CHANGELOG=unreleased
      3ad578d4
    • Vladimir Davydov's avatar
      gdb: fix printing binary strings encoded in MsgPack · 4719d70b
      Vladimir Davydov authored
      One may encode a non-printable string under the MsgPack type MP_STR.
      In fact, there's no way to encode binary data as MP_BIN from Lua so
      users often do that, which breaks our gdb extension. Let's encode a
      string in base64 if unicode() raises an error, like we do with MP_BIN.
      
      While we are at it,
       - escape double quotes in printable strings;
       - fix MP_BIN encoding (b64encode takes and returns bytes).
       - don't use YAML !!binary prefix before base64 data - use bin: and str:
         instead.
      
      Here's what it looks like:
      
      ```
      (gdb) p *box_tuple_last
        <...>
        data = ["\"тест\\foo\"", str:/w==, bin:/w==]}
      ```
      
      The tuple was created with the following command:
      
      ```
      tarantool> msgpack = require('msgpack')
      ---
      ...
      
      tarantool> box.tuple.new(
               >   msgpack.object_from_raw('\xae"тест\\foo"'), -- MP_STR unicode
               >   msgpack.object_from_raw('\xa1\xff'),        -- MP_STR binary
               >   msgpack.object_from_raw('\xc4\x01\xff'))    -- MP_BIN
      ---
      - ['"тест\foo"', !!binary /w==, !!binary /w==]
      ...
      ```
      
      Follow-up commit 08a171a4 ("gdb: support unicode in MP_STR type of
      MsgPack").
      
      NO_DOC=gdb extension
      NO_TEST=gdb extension
      NO_CHANGELOG=gdb extension
      4719d70b
    • Vladimir Davydov's avatar
      Move tarantool-gdb.py to tools · f01e68b0
      Vladimir Davydov authored
      It doesn't belong to Tarantool sources. The tools directory looks like
      the right place for it.
      
      NO_DOC=code cleanup
      NO_TEST=code cleanup
      NO_CHANGELOG=code cleanup
      f01e68b0
    • Mergen Imeev's avatar
      box: support downgrading of tuple constraints · 436b1b17
      Mergen Imeev authored
      This patch allows to downgrade tuple foreign keys to SQL foreign keys
      and some tuple check constraints to SQL check constraints. The only
      tuple check constraints that can be downgraded are those using functions
      with the SQL_EXPR language.
      
      Closes #7718
      
      NO_DOC=already introduced
      NO_CHANGELOG=already introduced
      436b1b17
    • Timur Safin's avatar
      debugger: use option -d for debugger activation · a984fc0d
      Timur Safin authored
      Added `-d` option for activation of debugger shell:
      - it calls debugger shell in `luadebug.lua` instead of
        a standard interactive shell from `console.lua`;
      - that option complements original way for starting a
        debugging shell via `require 'luadebug'()`, but is a
        little bit easier.
      
      NB! At the moment when we enter debugging mode instead of
      a standard Tarantool console, we change banner to:
      ```
      Tarantool debugger 2.11.0-entrypoint-852-g9e6ed28ae
      type 'help' for interactive help
      ```
      
      Part of #7456
      
      @TarantoolBot document
      Title: Command-line option `-d` for console debugger.
      
      Please see third_party/lua/README-luadebug.md for a full description
      of different ways to activate debugging shell.
      a984fc0d
    • Igor Munkin's avatar
      luajit: bump new version · 5c8dd500
      Igor Munkin authored
      * ci: add LUAJIT_ENABLE_CHECKHOOK for exotic matrix
      * ci: add ARM64 architecture to exotic testing
      * ci: update action/checkout to v3
      * Fix os.date() for wider libc strftime() compatibility.
      * x86/x64: Fix loop realignment.
      * ci: introduce workflow for exotic builds
      * sysprof: fix interval parsing in dual-number mode
      * test: add test for `string.format('%c', 0)`
      * ci: drop obsolete arguments for LuaJIT integration
      
      Part of #8069
      
      NO_DOC=LuaJIT submodule bump
      NO_TEST=LuaJIT submodule bump
      5c8dd500
    • Nikolay Shirokovskiy's avatar
      upgrade: add "2.10.5" to box.schema.downgrade_versions(). · 6fcce8e8
      Nikolay Shirokovskiy authored
      2.10.5 version is going to be released at the same time as 2.11.0 thus
      let's add it to the box.schema.downgrade_versions().
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      NO_TEST=internal
      6fcce8e8
    • Ilya Verbin's avatar
      log: allow "tarantool" as module name in box.cfg{log_modules = ...} · facd04c2
      Ilya Verbin authored
      Currently it's possible to set the log level for a particular Lua module,
      or to change the default log level, however there is no way to change it
      only for Tarantool system messages. This patch introduces a fake module
      name "tarantool" for this purpose.
      
      Closes #8320
      
      NO_CHANGELOG=Unreleased feature
      NO_DOC=Will update tarantool/doc#3264
      facd04c2
    • Timur Safin's avatar
      debugger: match paths suffixes in breakpoints · 8a2ba411
      Timur Safin authored
      We used to "normalize" breakpoint filename paths
      down to their basic name, which worked fine for
      unique file names, but is getting annoying when
      you need to debug a code in one of many `init.lua`
      modules, i.e.
      
          break init.lua:5
      
      Will stop at _every_ `init.lua` file we will run
      at the debugging session.
      
      So we add machinery for partial paths lookup, to
      make possible to set breakpoints using (unique-enough)
      path suffixes, e.g. if we have multiple `init.lua` in
      the application, i.e.
          ./init.lua
          ./A/init.lua
          ./B/init.lua
      
      Then we could use syntax:
      
          break A/init.lua:5
      
      To activate debugger breakpoint only in the particular
      module, and not trigger it elsewhere.
      
      Current suffix trees limitations and peculiarities
      --------------------------------------------------
      
      Please keep in mind that suffix-tree algorithm, used for
      partial paths lookup, uses `$ref` and `$f` node names
      for their own purposes. That means that it would not handle
      well breakpoints with paths containing `$f` and `$ref`.
      That's not a big problem given that majority of filesystems
      we are running on do not usually allow `$` as part of
      file name.
      
      Also, due to suffix tree lookup behavior, if we would
      activate multiple breakpoints:
          break init.lua:10
          break A/init.lua:10
      
      Then _least specific_ `init.lua:10` breakpoint will trigger.
      From users' prospective it makes no much difference, as we
      need to stop in debugger shell in this line, but this is
      the way how suffix tree is working.
      
      Dot files treatment
      -------------------
      
      There is a special mechanism for `.` and `..` treatment
      if they are at the header of a path provided. I.e.
      
          break ./main.lua:10
          break ../a/b/c/least.lua:15
      
      For these cases `.` and `..` will be converted to the
      full path to the given file location.
      
      NO_TEST=hard to implement tests. Postponed till step.5
      
      @TarantoolBot document
      Title: Breakpoints in console debugger for Lua
      
      Match partial path patterns in breakpoints
      ==========================================
      
      Please see `third_party/lua/README-luadebug.md` for
      a fuller description of partial path syntax one could use
      in a breakpoints definition.
      8a2ba411
    • Timur Safin's avatar
      debugger: match paths suffixes in breakpoints · c5c2b6aa
      Timur Safin authored
      We used to "normalize" breakpoint filename paths
      down to their basic name, which worked fine for
      unique file names, but is getting annoying when
      you need to debug a code in one of many `init.lua`
      modules, i.e.
      
          break init.lua:5
      
      Will stop at _every_ `init.lua` file we will run
      at the debugging session.
      
      So we add machinery for partial paths lookup, to
      make possible to set breakpoints using (unique-enough)
      path suffixes, e.g. if we have multiple `init.lua` in
      the application, i.e.
          ./init.lua
          ./A/init.lua
          ./B/init.lua
      
      Then we could use syntax:
      
          break A/init.lua:5
      
      To activate debugger breakpoint only in the particular
      module, and not trigger it elsewhere.
      
      NB! If we will activate multiple breakpoints:
          break init.lua:10
          break A/init.lua:10
      
      Then _least specific_ `init.lua:10` breakpoint will trigger.
      From users' prospective it makes no much difference, as we
      need to stop in debugger shell in this line, but this is
      the way how suffix tree is working.
      
      NO_TEST=hard to implement tests. Postponed till step.5
      
      @TarantoolBot document
      Title: Breakpoints in console debugger for Lua
      
      Match partial path patterns in breakpoints
      ==========================================
      
      Please see `third_party/lua/README-luadebug.md` for
      a fuller description of partial path syntax one could use
      in a breakpoints definition.
      c5c2b6aa
    • Timur Safin's avatar
      debugger: changelog and readme updated · cc1163a9
      Timur Safin authored
      * Added breakpoints support in debugger;
      
      NO_TEST=documentation added
      
      @TarantoolBot document
      Title: Breakpoints in console debugger for Lua
      
      Breakpoints support
      ===================
      
      Please see `third_party/lua/README-luadebug.md` for
      a description of breakpoints support introduced to the
      builtin console debugger in `luadebug.lua`.
      cc1163a9
    • Timur Safin's avatar
      debugger: refactor auto listing · e3c73d5b
      Timur Safin authored
      Commonize mechanism activated by `dbg.cfg.auto_where` and an
      automatic code listing we show for breakpoint context.
      
      Make sure we do not show redundant listing, i.e. after
      commands `where #`, or `up`, or `down` we do not output
      automatic listing, as there was already shown some different
      context.
      
      NO_DOC=see later
      NO_CHANGELOG=internal
      NO_TEST=internal
      e3c73d5b
    • Timur Safin's avatar
      debugger: better help message · f5366146
      Timur Safin authored
      Make message, which is shown for a `help` command,
      to be more readable.
      
      NO_DOC=see later commit
      NO_CHANGELOG=internal
      NO_TEST=internal
      f5366146
    • Timur Safin's avatar
      debugger: introduce dbg_write_error, dbg_write_warn · ae3653a7
      Timur Safin authored
      Introduced `dbg_write_error` to centralize the way
      how errors reported in debugger shell.
      
      Similarly `dbg_write_warn` is used for reporting of
      highlighted non-fatal warnings.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      ae3653a7
    • Timur Safin's avatar
      debugger: uncolor variables · 466edbbf
      Timur Safin authored
      We may use "caret" or "arrow" symbols either in
      colored or uncolored contexts. To reduce further
      confusion we get rid of colored prefixes.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      NO_TEST=internal
      466edbbf
    • Timur Safin's avatar
      debugger: trim generated size of debug.info · 91900411
      Timur Safin authored
      In many cases we do not need to use all "Snl"
      parameters in `debug.getinfo()`: so try to trim wherever
      possible "n", which is calculating `name` and `namewhat`,
      and "S" which is generating `source`, `short_src` and others.
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      NO_TEST=internal
      91900411
    • Timur Safin's avatar
      debugger: better annotated listing · 49f419ce
      Timur Safin authored
      Visualize properly locations with breakpoints
      saved there. In addition to current line visualization
      (using green '=>') we annotate corresponding line with
      red "●".
      
      NO_TEST=see the later commit
      NO_DOC=internals
      NO_CHANGELOG=internals
      49f419ce
    • Timur Safin's avatar
      debugger: handle breakpoints · 80460557
      Timur Safin authored
      Introduced few new commands to handle breakpoints:
      - `b file:NNN` to set new breakpoint;
      - `bd file:NNN` to remove breakpoint;
      - 'bl` to list all active breakpoints.
      
      There is partial breakpoint notation supported when
      for `b :N` or `b +N` breakpoint will be set to the
      asked line in the _currently_ debugged file.
      
      Changed `c` (continue) to stop on breakpoints, if there any active
      one asssigned by user. Otherwise it still run in full speed, without
      any hook check.
      
      NO_DOC=see the later commit
      NO_CHANGELOG=see the later commit
      80460557
Loading