Skip to content
Snippets Groups Projects
  1. Oct 16, 2020
    • Alexander Turenko's avatar
      lua: don't raise a Lua error from luaT_tuple_new() · ec9a7fa7
      Alexander Turenko authored
      This change fixes incorrect behaviour at tuple serialization error in
      several places: <space_object>:frommap(), <key_def_object>:compare(),
      <merge_source>:select(). See more in #5382.
      
      Disallow creating a tuple from objects on the Lua stack (idx == 0) in
      luaT_tuple_new() for simplicity. There are no such usages in tarantool.
      The function is not exposed yet to the module API. This is only
      necessary in box.tuple.new(), which anyway raises Lua errors by its
      contract.
      
      The better way to implement it would be rewritting of serialization from
      Lua to msgpack without raising Lua errors, but it is labirous work. Some
      day, I hope, I'll return here.
      
      Part of #5273
      Fixes #5382
      ec9a7fa7
    • Alexander Turenko's avatar
      lua: factor out tuple encoding from luaT_tuple_new · 59149d6a
      Alexander Turenko authored
      It simplifies further changes around encoding a tuple: next commits will
      get rid of throwing serialization errors and will expose a function to
      encode a table (or tuple) from the Lua stack on the box region to the
      module API.
      
      Part of #5273
      Part of #5382
      59149d6a
    • Alexander Turenko's avatar
      module api/lua: add luaL_iscdata() function · 6a63b7c0
      Alexander Turenko authored
      It is useful to provide a module specific error when cdata expected, but
      a value of another type is passed.
      
      Alternative would be using of lua_type() to check against LUA_TCDATA,
      but this constant is not exposed for modules. See more in the
      luaL_iscdata() API comment.
      
      Part of #5273
      6a63b7c0
    • Alexander Turenko's avatar
      module api: expose box region · c6117909
      Alexander Turenko authored
      It is the better alternative to linking the small library directly to a
      module. Why not just use the small library in a module?
      
      Functions from an executable are preferred over ones that are shipped in
      a dynamic library (on Linux, Mac OS differs), while a module may use the
      small library directly. It may cause a problem when some functions from
      the library are inlined, but some are not, and those different versions
      of the library offer structures with different layouts. Small library
      symbols may be exported by the tarantool executable after the change of
      default symbols visibility (see [1]). See more details and examples in
      [2].
      
      So it is better to expose so called box region and get rid of all those
      compatibility problems.
      
      [1]: 2.5.0-42-g03790ac55 ('cmake: remove dynamic-list linker option')
      [2]: https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html
      
      Part of #5273
      c6117909
    • Alexander Turenko's avatar
      module api: get rid of typedef redefinitions · a25a3e0d
      Alexander Turenko authored
      Technically C99 forbids it. Clang complains about typedef redefinitions
      when C99 is used (it is default prior to clang 3.6):
      
       | error: redefinition of typedef 'box_tuple_t' is a C11 feature
       |        [-Werror,-Wtypedef-redefinition]
       | error: redefinition of typedef 'box_key_def_t' is a C11 feature
       |        [-Werror,-Wtypedef-redefinition]
      
      The generated module.h file should define a type using typedef once.
      This patch moves extra definitions out of public parts of header files.
      Reordered api headers to place usages of such types after definitions.
      
      Set C99 for the module API test in order to catch problems of this kind
      in a future. Fixed 'unused value' warnings, which appears after the
      change (it is strange that -Wall was not passed here before).
      
      Part of #5273
      Fixes #5313
      a25a3e0d
  2. Oct 15, 2020
  3. Oct 14, 2020
    • Alexander V. Tikhonov's avatar
      gitlab-ci: remove tag from pushed branch commit · 0f564f34
      Alexander V. Tikhonov authored
      
      Drop a tag that points to a current commit (if any) on a job triggered
      by pushing to a branch (as against of pushing a tag). Otherwise we may
      get two jobs for the same x.y.z-0-gxxxxxxxxx build: one is run by
      pushing a branch and another by pushing a tag. The idea is to hide the
      new tag from the branch job as if a tag would be pushed strictly after
      all branch jobs for the same commit.
      
      Closes #3745
      
      Co-authored-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      0f564f34
    • Nikita Pettik's avatar
      vinyl: remove squash procedures from source code · 375f2d17
      Nikita Pettik authored
      After previous commit, there's no need in these functions. However,
      someday we may want to reconsider it squash optimization and make it
      work without breaking upsert associativity rule. So to not lost initial
      squash implementation, let's put its removal in a separate patch.
      
      Follow-up #5107
      375f2d17
    • Nikita Pettik's avatar
      vinyl: rework upsert operation · 5a61c471
      Nikita Pettik authored
      Previous upsert implementation had a few drawbacks which led to number
      of various bugs and issues.
      
      Issue #5092 (redundant update operations execution)
      
      In a nutshell, application of upsert(s) (on top of another upsert)
      consists of two actions (see vy_apply_upsert()): execute and squash.
      Consider example:
      
      insert({1, 1})  -- terminal statement, stored on disk
      upsert({1}, {{'-', 2, 20}}) -- old ups1
      upsert({1}, {{'+', 2, 10}}) -- new ups2
      
      'Execute' step takes update operations from the new upsert and combines them
      with key of the old upsert.  {1} + {'+', 2, 10} can't be evaluated since
      key consists of only one field. Note that in case upsert doesn't fold
      into insert the upsert's tuple and the tuple stored in index can be
      different. In our particular case, tuple stored on disk has two fields
      ({1, 1}), so first upsert's update operation can be applied to it:
      {1, 1} + {'+', 2, 10} --> {1, 11}. If upsert's operation can't be executed
      using key of old upsert, we simply continue processing squash step.
      In turn 'squash' is a combination of update operations: arithmetic
      operations are combined so we don't have to store actions over the same
      field; the rest operations - are merged into single array. As a result,
      we get one upsert with squashed operations: upsert({1}, {{'+', 2, -10}}).
      Then vy_apply_upsert() is called again to apply new upsert on the top of
      terminal statement - insert{1, 1}. Since now tuple has second field,
      update operations can be executed and corresponding result is {1, -9}.
      It is the final result of upsert application procedure.
      Now imagine that we have following upserts:
      
      upsert({1, 1}, {{'-', 2, 20}}) -- old ups1
      upsert({1}, {{'+', 2, 10}}) -- new ups2
      
      In this case execution successfully finishes and modifies old upsert's
      tuple: {1, 1} + {'+', 2, 10} --> {1, 11}
      However, we still have to squash/accumulate update operations since they
      may be applied on tuple stored on disk later. After all, we have
      following upsert: upsert({2, 11}, {{'+', 2, -10}}). Then it is applied
      on the top of insert({1, 1}) and we get the same result as in the first
      case - {1, -9}. The only difference is that upsert's tuple was modified.
      As one can see, execution of update operations applied to upsert's tuple
      is redundant in the case index already contains tuple with the same key
      (i.e. when upserts turns into update). Instead, we are able to
      accumulate/squash update operations only. When the last upsert is being
      applied, we can either execute all update operation on tuple fetched
      from index (i.e. upsert is update) OR on tuple specified in the first
      upsert (i.e. first upsert is insert).
      
      Issue #5105 (upsert doesn't follow associative property)
      
      Secondly, current approach breaks associative property: after upsert's
      update operations are merged into one array, part of them (related to
      one upsert) can be skipped, meanwhile the rest - is applied. For
      instance:
      
      -- Index is over second field.
      i = s:create_index('pk', {parts={2, 'uint'}})
      s:replace{1, 2, 3, 'default'}
      s:upsert({2, 2, 2}, {{'=', 4, 'upserted'}})
      -- First update operation modifies primary key, so upsert must be ignored.
      s:upsert({2, 2, 2}, {{'#', 1, 1}, {'!', 3, 1}})
      
      After merging two upserts we get the next one:
      upsert({2, 2, 2}, {{'=', 4, 'upserted'}, {'#', 1, 1}, {'!', 3, 1}}
      
      While we executing update operations, we don't distinguish operations from
      different upserts. Thus, if one operation fails, the rest are ignored
      as well. As a result, first (in general case - all preceding squashed
      upserts) upsert won't be applied, even despite the fact it is
      absolutely correct. What is more, user gets no error/warning concerning
      this fact.
      
      Issue #1622 (no upsert result validation)
      
      After upsert application, there's no check verifying that result
      satisfies space's format: number of fields, their types, overflows etc.
      Due to this tuples violating format may appear in the space, which in
      turn may lead to unpredictable consequences.
      
      To resolve these issues, let's group update operations of each upsert into
      separate array. So that operations related to particular upsert are
      stored in single array. In terms of previous example we will get:
      upsert({2, 2, 2}, {{{'=', 4, 'upserted'}}, {{'#', 1, 1}, {'!', 3, 1}}}
      
      Also note that we don't longer have to apply update operations on tuple
      in vy_apply_upsert() when it comes for two upserts: it can be done once we
      face terminal statement; or if there's no underlying statement (i.e. it is
      delete statement or no statement at all) we apply all update arrays except
      the first one on upsert's tuple. In case one of operations from array
      fail, we skip the rest operations from this array and process to the
      next array. After successful application of update operations of each
      array, we check that the resulting tuple fits into space format. If they
      aren't, we rollback applied operations, log error and moving to the next
      group of operations.
      
      Finally, arithmetic operations are not longer able to be combined: it is
      requirement which is arises from #5105 issue.  Otherwise, result of
      upserts combination might turn out to be inapplicable to the tuple
      stored on disk (e.g. result applied on tuple leads to integer overflow -
      in this case only last upsert leading to overflow must be ignored).
      
      Closes #1622
      Closes #5105
      Closes #5092
      Part of #5107
      5a61c471
    • Artem Starshov's avatar
      luacheck: fix warning in tarantoolctl.in · 33870e37
      Artem Starshov authored
      
      Changed passing global variable arg to function find_instance_name(arg)
      instead of passing arg[0] and arg[2] separately. And removed exception
      in .luacheckrc for file /extra/dist/tarantoolctl.in.
      
      This change only solves linter warning, nothing else.
      
      Fixed #4929.
      
      Reviewed-by: default avatarLeonid Vasiliev <lvasiliev@tarantool.org>
      Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
      33870e37
    • Vladislav Shpilevoy's avatar
      qsync: reset confirmed lsn in limbo on owner change · 41ba1479
      Vladislav Shpilevoy authored
      Order of LSNs from different instances can be any. It means, that
      if the synchronous transaction limbo changed its owner, the old
      value of maximal confirmed LSN does not make sense. The new owner
      means new LSNs, even less than the previously confirmed LSN of an
      old owner.
      
      The patch resets the confirmed LSN when the owner is changed. No
      specific test for that, as this is a hotfix - tests start fail on
      every run after a new election test was added in the previous
      commit. A test for this bug will be added later.
      
      Part of #5395
      41ba1479
    • Vladislav Shpilevoy's avatar
      raft: auto-commit transactions of the old leader · 4da30149
      Vladislav Shpilevoy authored
      According to Raft, when a new leader is elected, it should finish
      transactions of the old leader. In Raft this is done via adding a
      new transaction originated from the new leader.
      
      In case of Tarantool this can be done without a new transaction
      due to WAL format specifics, and the function doing it is called
      box_clear_synchro_queue().
      
      Before the patch, when a node was elected as a leader, it didn't
      finish the pending transactions. The queue clearance was expected
      to be done by a user. There was no any issue with that, just
      technical debt. The patch fixes it.
      
      Now when a node becomes a leader, it finishes synchronous
      transactions of the old leader. This is done a bit differently
      than in the public box.ctl.clear_synchro_queue().
      
      The public box.ctl.clear_synchro_queue() tries to wait for CONFIRM
      messages, which may be late. For replication_synchro_timeout * 2
      time.
      
      But when a new leader is elected, the leader will ignore all rows
      from all the other nodes, as it thinks it is the only source of
      truth. Therefore it makes no sense to wait for CONFIRMs here, and
      the waiting is omitted.
      
      Closes #5339
      4da30149
    • Vladislav Shpilevoy's avatar
      raft: introduce on_update trigger · 43d42969
      Vladislav Shpilevoy authored
      Raft state machine now has a trigger invoked each time when any of
      the visible Raft attributes is changed: state, term, vote.
      
      The trigger is needed to commit synchronous transactions of an old
      leader, when a new leader is elected. This is done via a trigger
      so as not to depend on box in raft code too much. That would make
      it harder to extract it into a new module later.
      
      The trigger is executed in the Raft worker fiber, so as not to
      stop the state machine transitions anywhere, which currently don't
      contain a single yield. And the synchronous transaction queue
      clearance requires a yield, to write CONFIRM and ROLLBACK records
      to WAL.
      
      Part of #5339
      43d42969
    • Vladislav Shpilevoy's avatar
      raft: new candidate should wait for leader death · 6b43f103
      Vladislav Shpilevoy authored
      When a raft node was configured to be a candidate via
      election_mode, it didn't do anything if there was an active
      leader.
      
      But it should have started monitoring its health in order to
      initiate a new election round when it dies.
      
      The patch fixes this bug. It does not contain a test, because will
      be covered by a test for #5339.
      
      Needed for #5339
      6b43f103
    • Vladislav Shpilevoy's avatar
      raft: factor out the code to wakeup worker fiber · da4998ea
      Vladislav Shpilevoy authored
      Raft has a worker fiber to perform async tasks such as WAL write,
      state broadcast.
      
      The worker was created and woken up from 2 places, leading at
      least to code duplication. The patch wraps it into a new function
      raft_worker_wakeup(), and uses it.
      
      The patch is not need for anything functional, but was created
      while working on #5339 and trying ideas. The patch seems to be
      good refactoring making the code simpler, and therefore it is
      submitted.
      da4998ea
    • Vladislav Shpilevoy's avatar
      test: add '_stress' suffix to election_qsync test · bd0da669
      Vladislav Shpilevoy authored
      The test is long, about 10 seconds. But its name is too general.
      And it would be better used for a simpler more basic test. This is
      going to happen in the next commits.
      
      election_qsync.test.lua will check if the election and qsync work
      fine together without any stress cases.
      
      Needed for #5339
      bd0da669
    • Alexander V. Tikhonov's avatar
      test: flaky vinyl/gh.test.lua fails on 427 line · 77848aa8
      Alexander V. Tikhonov authored
      Added new checksum for flaky fail on vinyl/gh.test.lua:427 line.
      
      Part of #5141
      77848aa8
    • Alexander V. Tikhonov's avatar
      test: flaky replication/replica_rejoin.test.lua · d9d1deac
      Alexander V. Tikhonov authored
      On heavy loaded hosts found the following issue:
      
        [151] --- replication/replica_rejoin.result     Tue Sep 29 10:57:26 2020
        [151] +++ replication/replica_rejoin.reject     Tue Sep 29 10:57:48 2020
        [151] @@ -230,7 +230,12 @@
        [151]      return box.info ~= nil and box.info.replication[1] ~= nil
        [151]  end)
        [151]  ---
        [151] -- true
        [151] +- error: &quot;builtin/box/load_cfg.lua:601: Please call box.cfg{} first\nstack traceback:\n\tbuiltin/box/load_cfg.lua:601:
        [151] +    in function &apos;__index&apos;\n\t[string \&quot;return test_run:wait_cond(function()         ...\&quot;]:1:
        [151] +    in function &apos;cond&apos;\n\t/tmp/tnt/151_replication/test_run.lua:411: in function &lt;/tmp/tnt/151_replication/test_run.lua:404&gt;\n\t[C]:
        [151] +    in function &apos;pcall&apos;\n\tbuiltin/box/console.lua:402: in function &apos;eval&apos;\n\tbuiltin/box/console.lua:708:
        [151] +    in function &apos;repl&apos;\n\tbuiltin/box/console.lua:842: in function &lt;builtin/box/console.lua:828&gt;\n\t[C]:
        [151] +    in function &apos;pcall&apos;\n\tbuiltin/socket.lua:1081: in function &lt;builtin/socket.lua:1079&gt;&quot;
        [151]  ...
        [151]  test_run:wait_upstream(1, {message_re = &apos;Missing %.xlog file&apos;, status = &apos;loading&apos;})
        [151]  ---
        [151]
      
      It happened because box.cfg was not ready to provide information. In
      real there is no need to use local check for replication information
      parts availablity, due to wait_upstream() function used below, do it
      itself.
      
      Part of #4985
      d9d1deac
  4. Oct 13, 2020
    • Igor Munkin's avatar
      build: another fix for luajit-tap tests cmake · e7203e38
      Igor Munkin authored
      
      Fixes the regression from e5039742
      ('luajit: bump new version').
      
      Reported-by: default avatarAlexander Tikhonov <avtikhon@tarantool.org>
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      e7203e38
    • Ilya Kosarev's avatar
      key_def: support composite types extraction · 9a8ac59c
      Ilya Kosarev authored
      key_def didn't support key definitions with array, map, varbinary & any
      fields. Thus they couldn't be extracted with
      key_def_object:extract_key(). Since the restriction existed due to
      impossibility of such types comparison, this patch removes the
      restriction for the fields extraction and only leaves it for
      comparison.
      
      Closes #4538
      9a8ac59c
    • Kirill Yukhin's avatar
      luajit: bump new version · e5039742
      Kirill Yukhin authored
      * misc: add C and Lua API for platform metrics
      * core: introduce various platform metrics
      e5039742
    • Alexander V. Tikhonov's avatar
      Add flaky tests checksums to fragile 2nd part · 3bc455f7
      Alexander V. Tikhonov authored
      Added for tests with issues:
      
        app/socket.test.lua				gh-4978
        box/access.test.lua				gh-5411
        box/access_misc.test.lua			gh-5401
        box/gh-5135-invalid-upsert.test.lua		gh-5376
        box/hash_64bit_replace.test.lua test		gh-5410
        box/hash_replace.test.lua			gh-5400
        box/huge_field_map_long.test.lua		gh-5375
        box/net.box_huge_data_gh-983.test.lua		gh-5402
        replication/anon.test.lua			gh-5381
        replication/autoboostrap.test.lua		gh-4933
        replication/box_set_replication_stress.test.lua gh-4992
        replication/election_basic.test.lua		gh-5368
        replication/election_qsync.test.lua test	gh-5395
        replication/gh-3247-misc-iproto-sequence-value-not-replicated.test.lua gh-5380
        replication/gh-3711-misc-no-restart-on-same-configuration.test.lua gh-5407
        replication/gh-5287-boot-anon.test.lua	gh-5412
        replication/gh-5298-qsync-recovery-snap.test.lua.test.lua gh-5379
        replication/show_error_on_disconnect.test.lua	gh-5371
        replication/status.test.lua			gh-5409
        swim/swim.test.lua				gh-5403
        unit/swim.test				gh-5399
        vinyl/gc.test.lua				gh-5383
        vinyl/gh-4864-stmt-alloc-fail-compact.test.lua test gh-5408
        vinyl/gh-4957-too-many-upserts.test.lua	gh-5378
        vinyl/gh.test.lua				gh-5141
        vinyl/quota.test.lua				gh-5377
        vinyl/snapshot.test.lua			gh-4984
        vinyl/stat.test.lua				gh-4951
        vinyl/upsert.test.lua				gh-5398
      3bc455f7
    • Alexander V. Tikhonov's avatar
      test: enable flaky tests on FreeBSD 12 · 8bcb6409
      Alexander V. Tikhonov authored
      Testing on FreeBSD 12 had some tests previously blocked to avoid of
      flaky fails. For now we have the ability to avoid of it in test-run
      using checksums for fails with opened issues. So adding back 7 tests
      to testing on FreeBSD 12.
      
      Closes #4271
      8bcb6409
    • Alexander V. Tikhonov's avatar
      asan: add leak suppressions for flaky test · 389c12b4
      Alexander V. Tikhonov authored
      Met flaky issues on test:
      
        replication/gh-3637-misc-error-on-replica-auth-fail.test.lua
      
      Found memory leaks:
      
      [093] Last 15 lines of Tarantool Log file [Instance "replica_auth"][/builds/DtQXhC5e/0/tarantool/tarantool/test/var/093_replication/replica_auth.log]:
      [093]     #3 0xa13df8 in coio_on_call /builds/DtQXhC5e/0/tarantool/tarantool/src/lib/core/coio_task.c:264:16
      [093]     #4 0xfcedbe in eio_execute /builds/DtQXhC5e/0/tarantool/tarantool/third_party/libeio/eio.c:2015:9
      [093]     #5 0xfcedbe in etp_proc /builds/DtQXhC5e/0/tarantool/tarantool/third_party/libeio/etp.c:373
      [093]     #6 0x7f8c8260ffa2 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fa2)
      [093]
      [093] Indirect leak of 4 byte(s) in 1 object(s) allocated from:
      [093]     #0 0x525dfa in calloc (/builds/DtQXhC5e/0/tarantool/tarantool/src/tarantool+0x525dfa)
      [093]     #1 0xa2eb4a in mh_i64ptr_new /builds/DtQXhC5e/0/tarantool/tarantool/src/lib/salad/mhash.h:408:22
      [093]     #2 0x8a516d in vy_recovery_new_f /builds/DtQXhC5e/0/tarantool/tarantool/src/box/vy_log.c:2321:23
      [093]     #3 0xa13df8 in coio_on_call /builds/DtQXhC5e/0/tarantool/tarantool/src/lib/core/coio_task.c:264:16
      [093]     #4 0xfcedbe in eio_execute /builds/DtQXhC5e/0/tarantool/tarantool/third_party/libeio/eio.c:2015:9
      [093]     #5 0xfcedbe in etp_proc /builds/DtQXhC5e/0/tarantool/tarantool/third_party/libeio/etp.c:373
      [093]     #6 0x7f8c8260ffa2 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fa2)
      
      To stabilize testing these leaks added as suppressions to asan list.
      
      Part of #5343
      389c12b4
    • Alexander V. Tikhonov's avatar
      test: move error messages into logs gh-5383 · fa66c295
      Alexander V. Tikhonov authored
      Set error message to log output in test:
      
        vinyl/gc.test.lua
      fa66c295
    • Alexander V. Tikhonov's avatar
      test: move error messages into logs gh-4984 · e95aec95
      Alexander V. Tikhonov authored
      Set error message to log output in test:
      
        vinyl/snapshot.test.lua
      e95aec95
    • Alexander V. Tikhonov's avatar
      test: move error messages into logs gh-5366 · c34d1d67
      Alexander V. Tikhonov authored
      Set error message to log output in test:
      
        replication/gh-4402-info-errno.test.lua
      c34d1d67
    • Alexander V. Tikhonov's avatar
      test: move error messages into logs gh-4985 · ca0c2799
      Alexander V. Tikhonov authored
      Set error message to log output in test:
      
        replication/replica_rejoin.test.lua
      ca0c2799
    • Alexander V. Tikhonov's avatar
      test: move error messages into logs gh-4940 · 1433ed8e
      Alexander V. Tikhonov authored
      Set error message to log output in test:
      
        replication/gh-3160-misc-heartbeats-on-master-changes.test.lua
      1433ed8e
    • Kirill Yukhin's avatar
      test-run: bump new version · 69b5759c
      Kirill Yukhin authored
      * Restart server on each failed test in worker
      69b5759c
  5. Oct 12, 2020
    • Vladislav Shpilevoy's avatar
      raft: introduce election_mode configuration option · 24974f36
      Vladislav Shpilevoy authored
      The new option can be one of 3 values: 'off', 'candidate',
      'voter'. It replaces 2 old options: election_is_enabled and
      election_is_candidate. These flags looked strange, that it was
      possible to set candidate true, but disable election at the same
      time. Also it would not look good if we would ever decide to
      introduce another mode like a data-less sentinel node, for
      example. Just for voting.
      
      Anyway, the single option approach looks easier to configure and
      to extend.
      
      - 'off' means the election is disabled on the node. It is the same
        as election_is_enabled = false in the old config;
      
      - 'voter' means the node can vote and is never writable. The same
        as election_is_enabled = true + election_is_candidate = false in
        the old config;
      
      - 'candidate' means the node is a full-featured cluster member,
        which eventually may become a leader. The same as
        election_is_enabled = true + election_is_candidate = true in the
        old config.
      
      Part of #1146
      24974f36
  6. Oct 07, 2020
    • Aleksandr Lyapunov's avatar
      Introduce fselect - formatted select · 0dc72812
      Aleksandr Lyapunov authored
      space:fselect and index:fselect fetch data like ordinal select,
      but formats the result like mysql does - with columns, column
      names etc. fselect converts tuple to strings using json,
      extending with spaces and cutting tail if necessary. It is
      designed for visual analysis of select result and shouldn't
      be used stored procedures.
      
      index:fselect(<key>, <opts>, <fselect_opts>)
      space:fselect(<key>, <opts>, <fselect_opts>)
      
      There are some options that can be specified in different ways:
       - among other common options (<opts>) with 'fselect_' prefix.
         (e.g. 'fselect_type=..')
       - in special <fselect_opts> map (with or without prefix).
       - in global variables with 'fselect_' prefix.
      
      The possible options are:
       - type:
          - 'sql' - like mysql result (default).
          - 'gh' (or 'github' or 'markdown') - markdown syntax, for
            copy-pasting to github.
          - 'jira' - jira table syntax (for copy-pasting to jira).
       - widths: array with desired widths of columns.
       - max_width: limit entire length of a row string, longest fields
         will be cut if necessary. Set to 0 (default) to detect and use
         screen width. Set to -1 for no limit.
       - print: (default - false) - print each line instead of adding
         to result.
       - use_nbsp: (default - true) - add invisible spaces to improve
         readability in YAML output. Not applicabble when print=true.
      
      There is also a pair of shortcuts:
      index/space:gselect - same as fselect, but with type='gh'.
      index/space:jselect - same as fselect, but with type='jira'.
      
      See test/engine/select.test.lua for examples.
      
      Closes #5161
      0dc72812
    • Sergey Kaplun's avatar
      fiber: fix build for disabled fiber top · ab64b120
      Sergey Kaplun authored
      In case when we build without `ENABLE_FIBER_TOP` neither
      `struct fiber` contains `clock_stat` field nor `FIBER_TIME_RES`
      constant is defined.
      This patch adds corresponding ifdef directive to avoid compilation
      errors.
      ab64b120
  7. Oct 06, 2020
Loading