Skip to content
Snippets Groups Projects
  1. Nov 19, 2018
    • Olga Arkhangelskaia's avatar
      box: fix comparison of config tables · 3de37476
      Olga Arkhangelskaia authored
      box.cfg() updates only those options that have actually changed.
      However, for replication it is not always true: box.cfg{replication = x}
      and box.cfg{replication = {x}} are treated differently, and as
      the result - replication is restarted. The patch fixes such behaviour.
      
      Closes #3711
      3de37476
  2. Nov 15, 2018
  3. Nov 13, 2018
    • Serge Petrenko's avatar
      box: ensure fiber processing box_cfg doesn't process messages from iproto · 031aea10
      Serge Petrenko authored
      In box_cfg() we have a call to gc_set_wal_watcher(), which creates pipes
      between 'wal' and 'tx' under the hood using cbus_pair().
      While pipes are being created, the fiber calling gc_set_wal_watcher()
      will process all the messages coming to 'tx' thread from iproto. This is
      wrong, since we have a separate fiber pool to handle iproto messages,
      and background fibers shouldn't participate in these messages
      processing. For example, this causes occasional credential corruption in
      the fiber executing box_cfg().
      
      Since tx fiber pool is already created at the time gc_set_wal_watcher()
      is called, we may forbid message processing for the fiber which calls
      the function, one of the tx fiber pool fibers will wake us up when the
      pipes are created.
      
      Closes #3779
      031aea10
  4. Nov 07, 2018
  5. Nov 05, 2018
  6. Nov 03, 2018
  7. Nov 02, 2018
    • Mergen Imeev's avatar
      box: wrong is_nullable for multiple indexes · 52b84d2e
      Mergen Imeev authored
      If field isn't defined by space format, than in case of multiple
      indexes field option is_nullable was the same as it was for last
      index that defines it. This is wrong as it should be 'true' only
      if it is 'true' for all indexes that defines it.
      
      Closes #3744.
      52b84d2e
  8. Nov 01, 2018
    • Georgy Kirichenko's avatar
      Show names of Lua functions in backtraces · 5b00d646
      Georgy Kirichenko authored
      Trace corresponding Lua state as well as normal C stack frames while
      fiber backtracing. This might be useful for debugging purposes.
      
      Fixes: #3538
      5b00d646
    • Georgy Kirichenko's avatar
      Use fiber lua state for triggers if possible · 7d040848
      Georgy Kirichenko authored
      Lua trigger invocation reuses a fiber lua state if exists instead of
      creating of new one for each new invocation. This is needed for a lua
      stack reconstruction during backtracing.
      
      Relates: #3538
      7d040848
    • Georgy Kirichenko's avatar
      Proper unwind for currently executing fiber · 98b2cdfa
      Georgy Kirichenko authored
      Each yielded fiber has a preserved coro state stored in a corresponding
      variable however an executing fiber has a volatile state placed in CPU
      registers (stack pointer, instruction pointer and non-volatile registers)
      and corresponding context-storing variable value is invalid.
      For already yielded fiber we have to use a special asm-written handler to make
      a temporary switch to the preserved state and capture executing context what
      is not needed for executing fiber.
      After the patch for the executing fiber NULL is passed to the backtrace
      function as coro context and then backtrace function could decide should
      it use special context-switching handler or might just use unw_getcontext
      from the unwind library.
      98b2cdfa
    • Georgy Kirichenko's avatar
      Do not inline coro unwind function · 85878bcf
      Georgy Kirichenko authored
      Do not inline coro_unwcontext because the unwind handler expects
      for a separate stack frame.
      85878bcf
    • Vladimir Davydov's avatar
      Merge branch '1.10' into 1.10-features · ef749ac3
      Vladimir Davydov authored
      ef749ac3
    • Vladimir Davydov's avatar
      httpc: fix compilation with libcurl >= 7.62.0 · 02da15f7
      Vladimir Davydov authored
      Starting from libcurl 7.62.0, CURL_SSL_CACERT is defined as a macro
      alias to CURLE_PEER_FAILED_VERIFICATION, see
      
        https://github.com/curl/curl/commit/3f3b26d6feb0667714902e836af608094235fca2
      
      This breaks compilation:
      
        httpc.c:337:7: error: duplicate case value 'CURLE_PEER_FAILED_VERIFICATION'
                case CURLE_PEER_FAILED_VERIFICATION:
                     ^
        httpc.c:336:7: note: previous case defined here
                case CURLE_SSL_CACERT:
                     ^
        curl.h:589:26: note: expanded from macro 'CURLE_SSL_CACERT'
        #define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION
                                 ^
      
      Fix this by using CURLE_SSL_CACERT only if libcurl version is less
      than 7.62.0.
      
      Note, we can't use CURL_AT_LEAST_VERSION to check libcurl version,
      because it isn't available in libcurl shipped with CentOS 6.
      02da15f7
    • Vladimir Davydov's avatar
      httpc: fix curl version check in httpc_set_keepalive · 74e20755
      Vladimir Davydov authored
      Obviously, the version check as it is now won't work once libcurl 8.0.0
      is released. Use LIBCURL_VERSION_NUM to correctly check libcurl version.
      
      Note, we can't use CURL_AT_LEAST_VERSION to check libcurl version,
      because it isn't available in libcurl shipped with CentOS 6.
      
      Fixex commit 7e62ac79 ("Add HTTP client based on libcurl").
      74e20755
    • Vladimir Davydov's avatar
      test: fix engine/ddl sporadic hang · 38845d6e
      Vladimir Davydov authored
      In Vinyl DDL aborts all affected writers before modifying a space so we
      must use pcall() to avoid hang.
      
      Closes #3786
      38845d6e
  9. Oct 29, 2018
    • Vladimir Davydov's avatar
      replication: keep header when request is modified by before_replace · 480c55b6
      Vladimir Davydov authored
      When space.before_replace trigger modifies the result of a remote
      operation, we clear the request header so that it gets rebuilt on
      commit. This is incorrect, because as a result we don't bump the
      master's component of the replica's vclock, which leads to the request
      being applied again when the replica reconnects. The issue manifests
      itself in sporadic replication/before_replace test failures.
      
      Fix it by updating the request header rather than clearing it so that
      replica id and lsn get preserved.
      
      Closes #3722
      480c55b6
    • Serge Petrenko's avatar
      hot_standby: reflect amount of recovered rows in box.info · 85299d97
      Serge Petrenko authored
      To be able to switch to hot_standby instance with minimal downtime, we
      need to know how far is it behind the primary instance, i.e. up to what
      vclock we have recovered. Previously this was impossible because
      box.info.vclock always referenced replicaset.vclock, which isn't updated
      during hot_standby.
      
      Introduce a pointer to relevant vclock: either recovery vclock (during
      local recovery) or replicaset.vclock (at all other times) and use it in
      box.info.vclock, box.info.lsn and box.info.signature.
      
      @locker: renamed last_row_vclock to box_vclock and constified it.
      
      Closes #3002
      85299d97
    • Alexander Turenko's avatar
      test: fix unix socket conflict in socket.test.lua · f950eb31
      Alexander Turenko authored
      Increased socket.readable / socket.wait timeouts.
      
      Rewritten port choosing: repeat bind+listen until succeeds, exclude
      incorrect port 65536 from the range.
      
      All these changes are needed to run the test in parallel on several
      test-run workers to investigate flaky failures of the test / of the
      suite. Some of these changes can also eliminate possible flaky failures.
      f950eb31
  10. Oct 26, 2018
    • Vladimir Davydov's avatar
      Merge branch '1.10' into 1.10-features · 9dcc7849
      Vladimir Davydov authored
      9dcc7849
    • Georgy Kirichenko's avatar
      lua: fix tuple cdata collecting · 022a3c50
      Georgy Kirichenko authored
      In some cases luajit does not collect cdata objects which were
      transformed with ffi.cast as tuple_bless does. In consequence, internal
      table with gc callback overflows and then lua crashes. There might be an
      internal luajit issue because it fires only for jitted code. But assigning
      a gc callback before transformation fixes the problem.
      
      Closes #3751
      022a3c50
    • Vladimir Davydov's avatar
      vinyl: do not account bloom filters to runtime quota · e4338cc5
      Vladimir Davydov authored
      Back when bloom filters were introduced, neither box.info.memory() nor
      box.stat.vinyl().memory didn't exist so bloom filters were accounted to
      box.runtime.info().used for lack of a better place. Now, there's no
      point to account them there. In fact, it's confusing, because bloom
      filters are allocated with malloc(), not from the runtime arena, so
      let's drop it.
      e4338cc5
    • Vladimir Davydov's avatar
      vinyl: fix memory leak in slice stream · 0066457c
      Vladimir Davydov authored
      If a tuple read from a run by a slice stream happens to be out of the
      slice bounds, it will never be freed. Fix it.
      
      The leak was introduced by commit c174c985 ("vinyl: implement new
      simple write iterator").
      0066457c
  11. Oct 25, 2018
    • Alexander Turenko's avatar
    • Alexander Turenko's avatar
    • Alexander Turenko's avatar
    • Alexander Turenko's avatar
      Upload tarballs to the new S3 buckets · a5da60bd
      Alexander Turenko authored
      Upload tarballs of alpha and beta tarantool versions (*.0 and *.1
      branches) into 2x (3x, 4x...) buckets. See more details about the
      release process in the documentation: [1].
      
      [1]: https://tarantool.io/en/doc/2.0/dev_guide/release_management/
      Unverified
      a5da60bd
    • Serge Petrenko's avatar
      replication: make join stage more informative · a6a22f1b
      Serge Petrenko authored
      This patch adds logging amount of rows received by applier during the
      join stage, the same way that recovery has it.
      
      Closes #3165
      a6a22f1b
    • Kirill Yukhin's avatar
      schema: refactor space cache API · c3dd46c5
      Kirill Yukhin authored
      Remove function which deletes from cache, making replace more general:
      it might be used for both insertions, deletions and replaces. Also, put
      assert on equality of space pointer found in cache to old one into
      replace routine.
      c3dd46c5
    • Vladimir Davydov's avatar
      wal: delete old wal files when running out of disk space · 8a1bdc82
      Vladimir Davydov authored
      Now if the WAL thread fails to preallocate disk space needed to commit
      a transaction, it will delete old WAL files until it succeeds or it
      deletes all files that are not needed for local recovery from the oldest
      checkpoint. After it deletes a file, it notifies the garbage collector
      via the WAL watcher interface. The latter then deactivates consumers
      that would need deleted files.
      
      The user doesn't see a ENOSPC error if the WAL thread successfully
      allocates disk space after deleting old files. Here's what's printed
      to the log when this happens:
      
        wal/101/main C> ran out of disk space, try to delete old WAL files
        wal/101/main I> removed /home/vlad/src/tarantool/test/var/001_replication/master/00000000000000000005.xlog
        wal/101/main I> removed /home/vlad/src/tarantool/test/var/001_replication/master/00000000000000000006.xlog
        wal/101/main I> removed /home/vlad/src/tarantool/test/var/001_replication/master/00000000000000000007.xlog
        main/105/main C> deactivated WAL consumer replica 82d0fa3f-6881-4bc5-a2c0-a0f5dcf80120 at {1: 5}
        main/105/main C> deactivated WAL consumer replica 98dce0a8-1213-4824-b31e-c7e3c4eaf437 at {1: 7}
      
      Closes #3397
      8a1bdc82
    • Vladimir Davydov's avatar
      wal: add event_mask to wal_watcher · b073b017
      Vladimir Davydov authored
      In order to implement WAL auto-deletion, we need a notification channel
      through which the WAL thread could notify TX that a WAL file was deleted
      so that the latter can shoot off stale replicas. We will reuse existing
      wal_watcher API for this. Currently, wal_watcher invokes the registered
      callback on each WAL write so using it as is would be inefficient. To
      avoid that, let's allow the caller to specify events of interest when
      registering a wal_watcher.
      
      Needed for #3397
      b073b017
    • Vladimir Davydov's avatar
      wal: rename wal_watcher->events to pending_events · da9c8c14
      Vladimir Davydov authored
      We will add another event bitmap to wal_watcher. To avoid confusion
      between them, let's rename wal_watcher->events.
      da9c8c14
    • Vladimir Davydov's avatar
      wal: pass wal_watcher_msg to wal_watcher callback · 7077341e
      Vladimir Davydov authored
      This should make it easier to pass some extra information along with the
      event mask. For example, we will use it to pass the vclock of the oldest
      stored WAL, which is needed for WAL auto-deletion.
      
      Needed for #3397
      7077341e
    • Alexander Turenko's avatar
      test: rewrote xlog/checkpoint_daemon.test.lua · 6f6a3040
      Alexander Turenko authored
      Updated the test case for #2780 to check a last snapshot file
      modification time instead of search log messages.
      
      The test was flaky, because of small timeouts on Linux, but now we
      spinning on a condition check to achieve both stable results and fast
      execution.
      
      Follows up #2780.
      Fixes #3684.
      6f6a3040
    • Alexander Turenko's avatar
      test: update test-run · b4d24341
      Alexander Turenko authored
      * added more details about hung tests (#107);
      * added show_reproduce_content option (#113);
      * fixed inspector error reporting for a failed app test;
      * expand action of use_unix_socket option to non-default servers;
      * updated tarantool-python submodule (#126);
      * added test_run:wait_cond() and test_run:wail_log().
      
      Updated box-py/call.test.py result file, because tarantool-python now
      uses CALL 1.7 convention by default and slightly changed yaml output
      formatting. See [1] and [3] for more information.
      
      Updated replication-py/cluster.test.py, because of changed
      tarantool-python internals, see commit [2].
      
      Updated box-py/iproto.test.py because it uses tarantool-python internals
      that was rewritten in [2]. Updated its result file according to CALL 1.7
      response format that was set as default with [1] and yaml output
      formatting changed within [3].
      
      Updated replication-py/swap.test.py result file, because of yaml output
      formatting that was slightly changed within [3].
      
      [1]: https://github.com/tarantool/tarantool-python/issues/82
      [2]: https://github.com/tarantool/tarantool-python/commit/4639d9ae1c48f1608bd599c6d93ed6bfca48fbf9
      [3]: https://github.com/tarantool/tarantool-python/issues/90
      b4d24341
    • Vladimir Davydov's avatar
      wal: preallocate disk space before writing rows · 76110901
      Vladimir Davydov authored
      This function introduces a new xlog method xlog_fallocate() that makes
      sure that the requested amount of disk space is available at the current
      write position. It does that with posix_fallocate(). The new method is
      called before writing anything to WAL, see wal_fallocate(). In order not
      to invoke the system call too often, wal_fallocate() allocates disk
      space in big chunks (1 MB).
      
      The reason why I'm doing this is that I want to have a single and
      clearly defined point in the code to handle ENOSPC errors, where
      I could delete old WALs and retry (this is what #3397 is about).
      
      Needed for #3397
      76110901
    • Vladimir Davydov's avatar
      vinyl: fix memory leak in write iterator · f4ae714b
      Vladimir Davydov authored
      Memory allocated for vy_write_iterator::src_heap is never freed. Fix it.
      The leak was introduced by commit c174c985 ("vinyl: implement new
      simple write iterator").
      f4ae714b
  12. Oct 24, 2018
Loading