Skip to content
Snippets Groups Projects
  1. Mar 06, 2018
    • Vladimir Davydov's avatar
      vinyl: get rid of obscure page cache promotion logic · cc3e66a9
      Vladimir Davydov authored
      vy_run_iterator_load_page() keeps two most recently read pages. This
      makes sense, because we often probe a page for a better match. Keeping
      two pages rather than just one makes sure we won't throw out the current
      page if probing fails to find a better match. What doesn't make sense
      though is cache promotion logic: we keep promoting the page containing
      the current key. The comment says:
      
              /*
               * The cache is at least two pages. Ensure that
               * subsequent read keeps the cur_key in the cache
               * by moving its page to the start of LRU list.
               */
              vy_run_iterator_cache_touch(itr, cur_key_page_no);
      
      The comment is quite misleading. The "cache" contains at most two pages.
      Proudly calling this travesty of a cache LRU is downright ridiculous.
      
      Anyway, touching the current page will simply swap the two cached pages
      if a key history spans less than two pages, resulting in no performance
      gain or loss whatsoever. However, if a key history spans more than two
      pages, it will evict a page that is about to be read.
      
      That said, let's get rid of this piece of crap.
      cc3e66a9
    • Vladimir Davydov's avatar
      vinyl: simplify vy_run_iterator_next_key · 3dd29307
      Vladimir Davydov authored
      vy_run_iterator_next_key() has to special-case LE/LT for the first
      and the last page. This is needed, because this function is used by
      vy_read_iterator_seek() for starting iteration. Actually, there's no
      point for vy_read_iterator_seek() to use vy_read_iterator_next_key() -
      vy_read_iterator_next_pos() + vy_read_iterator_find_lsn() would be
      enough. Bearing this in mind, simplify vy_run_iterator_next_key().
      3dd29307
    • Konstantin Osipov's avatar
  2. Mar 05, 2018
  3. Mar 01, 2018
  4. Feb 28, 2018
    • Georgy Kirichenko's avatar
      Send relay heartbeat if wal changes won't be send · 195d4462
      Georgy Kirichenko authored
      If a replica receives some changes then corresponding wal events are
      generated and relay fiber is waken up before heartbeat timeout.
      But there may be nothing to send if all changes are from the current
      relay peer. In this case an applier doesn't receive anything and break a
      connection.
      
      Fixes #3160
      195d4462
    • Vladimir Davydov's avatar
      vinyl: don't move to next range if it doesn't match EQ search key · ec278865
      Vladimir Davydov authored
      When iterating over a vinyl index, we move to the next range if the
      minimal (in terms of the search criteria) statement among all sources
      is outside the current range - see vy_read_iterator_next_key() and
      vy_read_iterator_range_is_done(). This is OK for GE/GT/LE/LT, but for
      EQ/REQ we should also make sure that the next range actually intersects
      with the search key - if it doesn't, there's no point in iterating to
      it. We used to have that check, but commit 5e414a73 ("vinyl: read
      iterator: do not reopen all sources when range is changed") accidentally
      removed it. As a result, unlimited EQ/REQ requests for partial keys read
      runs of all ranges and therefore take much longer. This patch brings
      this check back.
      ec278865
  5. Feb 26, 2018
    • Konstantin Osipov's avatar
      box.slab.info(): report total arena memory in arena_size · 64faad37
      Konstantin Osipov authored
      Add memory occupied by cached slabs to the size reported by
      arena_size and arena_used_ratio respectively.
      
      This should make memory monitoring easier:
      
      if items_used_ratio > 0.9 and arena_used_ratio > 0.9 and quota_used_ratio > 0.9 then
          we run out of memory
      end
      64faad37
  6. Feb 25, 2018
    • Konstantin Belyavskiy's avatar
      Fix linking with iconv under FreeBSD · 16a636f2
      Konstantin Belyavskiy authored
      On FreeBSD we have either system iconv (part of libc) or the one
      in /usr/local. The first one is not fully compatible with Linux/
      OSX iconv and both adds specific prefixes to function names.
      So to use them via Lua FFI mechanism, specific names are required.
      Proposal fix:
      Under FreeBSD link with /usr/local/lib/libiconv.so and add prefix.
      
      Closes gh-3073.
      16a636f2
  7. Feb 22, 2018
  8. Feb 21, 2018
  9. Feb 20, 2018
Loading