Skip to content
Snippets Groups Projects
  1. Jan 19, 2022
    • Vladimir Davydov's avatar
      box: make cfg value comparison more thorough · 2734785e
      Vladimir Davydov authored
      Use table.equals for comparing table-valued configuration parameters
      instead of ipairs. Needed to trigger reconfiguraiton if the new URI
      differs from the old one only by parameters, e.g.:
      
        box.cfg{listen = {uri = 3301, params = {transport = 'plain'}}}
        box.cfg{listen = {uri = 3301, params = {transport = 'ssl'}}}
      
      No test is added, because currently there's no URI parameters handled
      by box. The next commit adds the 'transport' parameter and a test that
      wouldn't pass without this commit.
      2734785e
    • Vladimir Davydov's avatar
      iostream: introduce context and use it for creating streams · 26482e90
      Vladimir Davydov authored
      IO stream context (iostream_ctx) stores information needed to construct
      an iostream object.  A context is created from URI and mode, which is
      either server or client. Currently, both parameters are ignored and a
      newly created context always constructs plain streams. However, in
      future we will create SSL streams for certain URIs. That's when we'll
      need the mode (SSL connection is asymmetrical).
      26482e90
    • Vladimir Davydov's avatar
      iostream: rename ctx to data · 0c4e6374
      Vladimir Davydov authored
      In SSL implementation iostream::ctx would point to a SSL object, while
      a SSL_CTX object would be used for creating streams. Let's rename ctx to
      data to avoid confusion.
      0c4e6374
    • Vladimir Davydov's avatar
      box: inline cfg_get_replication · a07f9143
      Vladimir Davydov authored
      The function is used only once, in box_sync_replication. Inlining it
      makes the code more robust - it allows us to throw from applier_new.
      a07f9143
    • Vladimir Davydov's avatar
      evio: pass iostream instead of fd (and uri) to on_accept callback · 7122f0f5
      Vladimir Davydov authored
      Currently, we always create a plain stream, but soon there will be an
      option to create an encrypted stream so let's pass iostream, which will
      encapsulate this information, instead of fd to the accept callback. The
      iostream will be created by evio in accordance with the settings passed
      in uri parameters so uri won't be needed in the accept callback.
      7122f0f5
    • Vladimir Davydov's avatar
      coio: drop coio_service · efee67ca
      Vladimir Davydov authored
      It's been many years since it was last used. I'm tired of patching it
      whenever I need to update evio_service. Besides, it decreases code
      coverage. So let's finally drop it. After all, it's just a few lines
      of trivial code that can be rewritten from scratch any time we need.
      efee67ca
    • Vladimir Davydov's avatar
      Rename iostream_create to plain_iostream_create · 34a7cfa8
      Vladimir Davydov authored
      The function creates a plain iostream so let's rename it accordingly.
      34a7cfa8
    • Vladimir Davydov's avatar
      net.box: allow to pass table uri to connect · 23a7ce80
      Vladimir Davydov authored
      There are two acceptable ways of calling `connect` - as a method of
      the net.box module or as a function defined in the module:
      
      ```lua
      local net = require('net.box')
      net.connect(...)
      net:connect(...)
      ```
      
      We determine which one is used by checking the type of the first
      argument: if it's a table, we assume that the function is called as
      a method. However, the first argument can be a table itself - in case
      it's a URI given in the extended format.
      
      Let's fix this check by comparing the first argument against the net.box
      module. Let's also add a test checking all possible combinations of
      `connect` arguments.
      
      Follow-up 0badb413 ("net.box: pass uri
      instead of host and port to state machine").
      23a7ce80
  2. Jan 18, 2022
    • Vladimir Davydov's avatar
      test: fix flaky engine/errinj_ddl test · 197088c3
      Vladimir Davydov authored
      The commit fixes the following test failure:
      
      ```
      [011] engine/errinj_ddl.test.lua                      memtx           [ fail ]
      [011]
      [011] Test failed! Result content mismatch:
      [011] --- engine/errinj_ddl.result      Tue Jan 18 15:28:21 2022
      [011] +++ var/rejects/engine/errinj_ddl.reject  Tue Jan 18 15:28:26 2022
      [011] @@ -343,7 +343,7 @@
      [011]  s:create_index('sk', {parts = {2, 'unsigned'}}) -- must fail
      [011]  ---
      [011]  - error: Duplicate key exists in unique index "sk" in space "test" with old tuple
      [011] -    - [101, 101, "xxxxxxxxxxxxxxxx"] and new tuple - [100, 101]
      [011] +    - [100, 101] and new tuple - [101, 101, "xxxxxxxxxxxxxxxx"]
      [011]  ...
      [011]  ch:get()
      [011]  ---
      ```
      
      The test is inherently racy: a conflicting tuple may be inserted to the
      new index either by the index build procedure or by the test fiber doing
      DML in the background. The error messages will disagree regarding what
      tuple should be considered old and which one new. Let's match the error
      message explicitly.
      
      The failure was introduced by d11fb306
      ("box: change ER_TUPLE_FOUND message") which enhanced error messages
      with conflicting tuples.
      197088c3
    • Georgiy Lebedev's avatar
      core: fix testing tuple field count overflow · 41fdd2a8
      Georgiy Lebedev authored
      Testing tuple field count overflow handling requires creating a severely
      large tuple with box.schema.FIELD_MAX (INT32_MAX) fields: introduce an
      error injection for testing this corner case.
      
      Fixes #6684
      41fdd2a8
  3. Jan 17, 2022
  4. Jan 14, 2022
    • Vladimir Davydov's avatar
      test: fix flaky vinyl/gh-4810-dump-during-index-build test · 5cd399b7
      Vladimir Davydov authored
      The commit fixes the following test failure:
      
      ```
      [082] vinyl/gh-4810-dump-during-index-build.test.lua                  Test timeout of 310 secs reached	[ fail ]
      [082]
      [082] Test failed! Result content mismatch:
      [082] --- vinyl/gh-4810-dump-during-index-build.result	Thu Dec  9 05:31:17 2021
      [082] +++ /build/usr/src/debug/tarantool-2.10.0~beta1.324.dev/test/var/rejects/vinyl/gh-4810-dump-during-index-build.reject	Thu Dec  9 06:51:03 2021
      [082] @@ -117,34 +117,3 @@
      [082]  for i = 1, ch:size() do
      [082]      ch:get()
      [082]  end;
      [082] - | ---
      [082] - | ...
      [082] -
      ...
      ```
      
      The test hangs waiting for the test fibers to exit. There are two test
      fibers - one builds an index, another populates the test space. The
      latter uses pcall so it always returns. The one that builds an index,
      however, doesn't. The problem is index build may fail because it builds
      a unique index while the fiber populating the space may insert
      non-unique values. Fix this by building a non-unique index instead,
      which should never fail. To reproduce the issue the test checks is fixed
      one can build any index, unique or non-unique, so it should be fine.
      
      Closes #5508
      5cd399b7
    • Vladimir Davydov's avatar
      test: fix flaky vinyl/gh test failure · cc6c328d
      Vladimir Davydov authored
      The commit fixes the following test failure:
      
      ```
      [005] vinyl/gh.test.lua                                               [ fail ]
      [005]
      [005] Test failed! Result content mismatch:
      [005] --- vinyl/gh.result	Mon Dec 13 15:03:45 2021
      [005] +++ /root/actions-runner/_work/tarantool/tarantool/test/var/rejects/vinyl/gh.reject	Fri Dec 17 10:41:24 2021
      [005] @@ -716,7 +716,7 @@
      [005]  ...
      [005]  test_run:wait_cond(function() return finished == 2 end)
      [005]  ---
      [005] -- true
      [005] +- false
      [005]  ...
      [005]  s:drop()
      [005]  ---
      ```
      
      The reason of the failure is that the fiber doing checkpoints fails,
      because a checkpoint may be already running by the checkpoint daemon.
      Invoke box.snapshot() under pcall to make the test more robust.
      
      Part of #5141
      cc6c328d
    • Vladimir Davydov's avatar
      test: fix flaky vinyl/deferred_delete test · 7f8c549b
      Vladimir Davydov authored
      The commit fixes the following test failure:
      
      ```
      [019] vinyl/deferred_delete.test.lua                                  [ fail ]
      [019]
      [019] Test failed! Result content mismatch:
      [019] --- vinyl/deferred_delete.result	Tue Jan 11 11:10:22 2022
      [019] +++ /build/usr/src/debug/tarantool-2.10.0~beta2.37.dev/test/var/rejects/vinyl/deferred_delete.reject	Fri Jan 14 11:45:26 2022
      [019] @@ -964,7 +964,7 @@
      [019]  ...
      [019]  sk:stat().disk.dump.count -- 1
      [019]  ---
      [019] -- 1
      [019] +- 0
      [019]  ...
      [019]  sk:stat().rows - dummy_rows -- 120 old REPLACEs + 120 new REPLACEs + 120 deferred DELETEs
      [019]  ---
      ```
      
      The test checks that compaction of a primary index triggers dump of
      secondary indexes of the same space, because it generates deferred
      DELETE statements. There's no guarantee that by the time compaction
      completes, secondary index dump have been completed as well, because
      compaction may ignore the memory quota (it uses vy_quota_force_use in
      vy_deferred_delete_on_replace). Make the check more robust by using
      wait_cond.
      
      Follow-up #5089
      7f8c549b
    • Vladimir Davydov's avatar
      test: use wait_cond in vinyl/deferred_delete test · 8c913a10
      Vladimir Davydov authored
      It's better than hand-written busy-wait.
      8c913a10
    • Vladimir Davydov's avatar
      test: fix flaky vinyl/gc test · cd9fd77e
      Vladimir Davydov authored
      The commit fixes the following test failure:
      
      ```
      [013] vinyl/gc.test.lua                                               [ fail ]
      [013]
      [013] Test failed! Result content mismatch:
      [013] --- vinyl/gc.result	Fri Dec 24 12:27:33 2021
      [013] +++ /build/usr/src/debug/tarantool-2.10.0~beta2.18.dev/test/var/rejects/vinyl/gc.reject	Thu Dec 30 10:29:29 2021
      [013] @@ -102,7 +102,7 @@
      [013]  ...
      [013]  check_files_number(2)
      [013]  ---
      [013] -- true
      [013] +- null
      [013]  ...
      [013]  -- All records should have been purged from the log by now
      [013]  -- so we should only keep the previous log file.
      ```
      
      The reason of the failure is that vylog files are deleted asynchronously
      (`box.snapshot()` doesn't wait for `unlink` to complete) since commit
      8e429f4b ("wal: remove old xlog files
      asynchronously"). So to fix the test, we just need to make the test wait
      for garbage collection to complete.
      
      Follow-up #5383
      cd9fd77e
    • mechanik20051988's avatar
      small: fix assertion during slab allocation · 68c29688
      mechanik20051988 authored
      When `slab_get` is called from `region_alloc` or `ibuf_alloc` first
      of all we try to calculate order of appropriate slab. But there is
      no check that requested size with slab meta is <= UINT32_MAX, that
      leads to assertion failer in `slab_order` function. There is no
      need for this assertion we should return `cache->order_max + 1`
      for this case.
      
      Closes #6726
      68c29688
  5. Jan 13, 2022
  6. Jan 12, 2022
  7. Jan 10, 2022
  8. Jan 04, 2022
  9. Dec 30, 2021
Loading