Skip to content
Snippets Groups Projects
  1. Nov 14, 2016
  2. Nov 13, 2016
  3. Nov 10, 2016
    • Vladimir Davydov's avatar
      Add iproto stress test · 4fdbbe3e
      Vladimir Davydov authored
      The test starts 5000 fibers each of which sends 20 requests in two
      batches via iproto. After that, it injects a 5 seconds delay to WAL and
      then waits until all the fibers have completed.
      
      The test takes about 20 seconds, so it's marked as long.
      
      Intended to catch bugs similar to #1439, #1892.
      4fdbbe3e
    • Konstantin Osipov's avatar
      iproto: make sure throttled connections are woken up · 975e92e3
      Konstantin Osipov authored
      If a message arrives when there is no output for the connection and the
      IPROTO_MSG_MAX limit is hit, the input will never be processed unless
      the other end writes more data to the socket.
      
      To make sure a throttled connection will be woken up eventually when the
      number of pending requests drops below IPROTO_MSG_MAX, let's link all
      throttled connections in a list and wake the oldest element from it
      whenever a messages is freed.
      
      The issue was initially attempted to be fixed by commit 52b47951
      ("Don't stop connection if there is no pending requests") by allowing to
      exceed the IPROTO_MSG_MAX limit. That commit, however, introduced the
      possibility of a deadlock due to depleting the fiber pool, which was
      "resolved" by commit 9492cddb ("iproto: fix IPROTO_MSG_MAX check") while
      reintroducing the original issue.
      
      Patch by Vladimir Davydov
      975e92e3
    • Vladimir Davydov's avatar
      vinyl: get rid of profiler · 94da1913
      Vladimir Davydov authored
      We can gather all the stats we need at run time.
      94da1913
    • Vladimir Davydov's avatar
      histogram: add new methods · 5960ec49
      Vladimir Davydov authored
       * histogram_discard() to remove previously added observations
       * histogram_snprint() to dump a histogram to a string buffer
      
      Required for maintaining a histogram of number of runs per range in
      vinyl.
      5960ec49
    • Roman Tsisyk's avatar
      vinyl: remove unused key_def from vy_stmt_new() · 38e50ecf
      Roman Tsisyk authored
      Fix compilation warnings with disable assertions
      38e50ecf
    • Roman Tsisyk's avatar
      7170217d
    • Vladimir Davydov's avatar
      vinyl: create file per each run · 349a8873
      Vladimir Davydov authored
      Creating only one file per range, as we do now, is inflexible, because
       - we can't easily coalesce two ranges from the tx thread
       - it's unclear how to implement multi-level design without introducing
         holes in range files
      
      So this patch switches vinyl to file-per-run design, where each run has
      its own file and a file descriptor to access it. Files are named as
      follows: <lsn>.<range_id>.<run_no>.{run,data}. The new name component,
      <run_no> is the serial number of the run in the range, starting from 0.
      As before, we start recovery from ranges with higher ids. We recover
      runs of the same range in the same order they were dumped. Range
      boundaries are stored in each run file.
      349a8873
    • Konstantin Osipov's avatar
      Minor comments and renames. · a85ea1cb
      Konstantin Osipov authored
      a85ea1cb
    • Georgy Kirichenko's avatar
      Fix errno for xlog_sync. Issue #1902 · 4cab8fc8
      Georgy Kirichenko authored
      errno returned via errorno member, not in result
      4cab8fc8
    • Alexandr Lyapunov's avatar
      1ac2a6b7
    • Georgy Kirichenko's avatar
      Preserve errno in fil_filename func. Issue #1902 · b3c8e3f7
      Georgy Kirichenko authored
      fio_filename replace errno by readlink call and can
      be used for error logging
      b3c8e3f7
  4. Nov 09, 2016
  5. Nov 03, 2016
    • Vladimir Davydov's avatar
      iproto: fix IPROTO_MSG_MAX check · 9492cddb
      Vladimir Davydov authored
      We shouldn't allow more than IPROTO_MSG_MAX requests, because this can
      result in depleting the tx fiber pool (FIBER_POOL_SIZE) and, as a
      result, a deadlock (e.g. WAL needs a fiber to wake up another fiber
      waiting for write to complete).
      
      The IPROTO_MSG_MAX check was effectively disabled by commit 52b47951
      ("Don't stop connection if there is no pending requests"):
      
      > --- a/src/box/iproto.cc
      > +++ b/src/box/iproto.cc
      > @@ -590,7 +590,10 @@ iproto_connection_on_input(ev_loop *loop, struct ev_io *watcher,
      >       try {
      >               /* Ensure we have sufficient space for the next round.  */
      >               struct iobuf *iobuf;
      > -             if (mempool_count(&iproto_msg_pool) > IPROTO_MSG_MAX ||
      > +             if ((mempool_count(&iproto_msg_pool) > IPROTO_MSG_MAX &&
      > +                     /* Don't stop connection if there is no pending requests */
      > +                     (ibuf_used(&con->iobuf[0]->in) > con->parse_size ||
      > +                      ibuf_used(&con->iobuf[1]->in))) ||
      >                   (iobuf = iproto_connection_input_iobuf(con)) == NULL) {
      >
      >                       ev_io_stop(loop, &con->input);
      >
      >         (ibuf_used(&con->iobuf[0]->in) > con->parse_size ||
      >          ibuf_used(&con->iobuf[1]->in))
      
      because
      
        (ibuf_used(&con->iobuf[0]->in) > con->parse_size ||
         ibuf_used(&con->iobuf[1]->in))
      
      is almost always false, since iproto_enqueue_batch() parses and flushes
      all available input so that both iobufs are empty and the parse_size is
      typically 0.
      
      It looks like the problem the above-mentioned commit tried to address is
      different. The thing is that mempool_count(&iproto_msg_pool) accounts
      not only active requests, but also disconnect messages allocated for
      each connection in advance. As a result, if there were more than
      IPROTO_MSG_MAX (768) connections, iproto would get stuck forever.
      
      That said, the true fix would be subtracting the number of connections
      from the number of objects allocated from iproto_msg_pool for the check.
      
      Closes #1892
      9492cddb
    • Vladimir Davydov's avatar
      vinyl: fix range iterator restore for eq order · 88aa2c8a
      Vladimir Davydov authored
      When restoring read iterator, we reopen range iterator with key equal to
      the last seen statement. This is incorrect for eq order and partial
      initial key. On restore we should position range iterator to the
      original range without changing it->key or it->order.
      88aa2c8a
    • Georgy Kirichenko's avatar
      Rename xlog_create to xdir_create_xlog() · b25302ed
      Georgy Kirichenko authored
      xlog_create() depend on xdir and we need a good name for similar function
      without xdir dependency.
      
      Needed #1720
      b25302ed
    • Roman Tsisyk's avatar
      Add comments to `struct request` API · 51f31a7e
      Roman Tsisyk authored
      Follow up the previous patch.
      51f31a7e
    • Georgy Kirichenko's avatar
      Expose request_encode()/decode to C API · fa0c9a45
      Georgy Kirichenko authored
      Needed for #1720
      fa0c9a45
    • Roman Tsisyk's avatar
      Review fixes for new vy_stmt_compare() API · 8af28d9f
      Roman Tsisyk authored
      * Inline vy_range_cmp and vy_range_cmpnode to
        remove double inversion of comparison logic
      * Streamline vy_stmt_compare_raw()
      * Rename API functions
      * Fix comments
      8af28d9f
    • Vladislav Shpilevoy's avatar
      Remove field offsets from SELECT/DELETE statements · d2952144
      Vladislav Shpilevoy authored
      See #1572
      d2952144
    • Vladislav Shpilevoy's avatar
      Refactore vy_stmt comparator · 1c9bcbbb
      Vladislav Shpilevoy authored
      vy_stmt_compare is split into the set
      of functions for comparison
      * any type statements
      * any type statement with an action statement (REPLACE, DELETE, UPSERT)
      * any type statement with a key statement (DELETE, SELECT)
      * an action statement with another action
      * a key statement with another key
      
      See #1572 stage 3 point 1
      1c9bcbbb
  6. Nov 02, 2016
  7. Nov 01, 2016
Loading