Skip to content
Snippets Groups Projects
  1. Apr 05, 2017
  2. Apr 04, 2017
  3. Apr 03, 2017
    • Vladislav Shpilevoy's avatar
      vinyl: reset max_dump_size in compact_new() · 55685eaf
      Vladislav Shpilevoy authored
      The dump of index-wide run can start when compaction of one or more
      ranges is in progress (see #2209). If we reset the max_dump_size and
      compact_priority in compact_complete, there can be the following case:
      
         compact_prio = x      compact_prio = y > x   compact_prio = 0
          |                 |                       |    => y has lost.
          +-----------------|-----------------------+
          |                 compact                 |
          +-----------------|-----------------------+
               +------------+
               |    dump    |
               +------------+
      
      Reset the compact_priority and max_dump_size in compact_new() and
      restore the saved values on abort.
      
      Needed for #2209
      55685eaf
    • Vladislav Shpilevoy's avatar
      vinyl: remember the last dumped key during dump task · e98648e7
      Vladislav Shpilevoy authored
      For all pages except the last we use its min_key as the left border
      and min_key of the next page as the right border. The last page doesn't
      have the right neighbour, so there is no way to determine its bounds.
      This patch add a right border for the last page to vy_task.
      
      This feature is needed to split correctly index-wide runs into ranges
      during compaction (#2209).
      
                                    Index-wide run
                     +-------------------------------------------+
                     |  page 1  |  page 2  |  page 3  |  page N  |  <--- max key
                     +-------------------------------------------+
      +-----------+-------------+---------------------+-------------+---------+
      | range 1   |   range 2   |       range 3       |   range 4   | range 5 |
      +-----------+-------------+---------------------+-------------+---------+
      
      Page N uses dump_task.max_written_key as its right border.
      e98648e7
    • Vladislav Shpilevoy's avatar
      vinyl: split vy_range_get_write_iterator into two functions · f3ecce75
      Vladislav Shpilevoy authored
      First, the vy_range_get_dump_iterator(), to merge frozen in-memory
      indexes.
      Second, the vy_range_get_compact_iterator(), to merge fozen
      in-memory indexes and some runs.
      
      Needed for #2209
      f3ecce75
    • Vladislav Shpilevoy's avatar
      vinyl: introduce vy_range.is_level_zero flag · f3764063
      Vladislav Shpilevoy authored
      During transition process to the single mem per index architecture we plan
      to use special ranges to handle index-wide runs. Add a flag to vy_log to
      distinguish between regular ranges and ranges used for index-wide runs.
      
      Needed for #2209
      f3764063
    • Vladislav Shpilevoy's avatar
  4. Mar 31, 2017
  5. Mar 30, 2017
  6. Mar 29, 2017
    • Ilya's avatar
      Fix flaky box/session.test.lua · 26e9e461
      Ilya authored
      Rewrite test using TAP to avoid interference of test-run.
      
      Fixes #2198
      26e9e461
    • Alexandr Lyapunov's avatar
      f34f9067
    • Georgy Kirichenko's avatar
      Extract struct index_def from struct key_def · d08f494e
      Georgy Kirichenko authored
      Now struct key_def contains only key definition - field numbers with types
      and format-specific comparators. struct index_def contains corresponding key
      definition and index parameters (type, name, and e.g.).
      
      Needed for #2225
      d08f494e
    • Georgy Kirichenko's avatar
      Delete key_list(add/del)_key · d35949d3
      Georgy Kirichenko authored
      Remove unused functions key_list_add_key and key_list_del_key.
      Prerequisite for #2225
      d35949d3
    • Vladimir Davydov's avatar
      vinyl: drop version check in run iterator · de137a65
      Vladimir Davydov authored
      A run can be deleted by a concurrent compaction task while a run
      iterator is reading it via coeio. Currently, we detect this by checking
      index and range versions after coeio task completes, which results in
      vy_run_iterator being dependant on vy_range. Due to this dependency, we
      can't add a run w/o a range to an iterator, which is required to make
      in-memory levels per index rather than per range. Let's remove this
      dependency by making vy_run_unref() return a boolean flag set if the
      run was deleted, and using this to abort run iterator.
      de137a65
  7. Mar 28, 2017
  8. Mar 27, 2017
    • Konstantin Osipov's avatar
      recovery: remove dead code · 6d2d029a
      Konstantin Osipov authored
      * remove dead code
      * reduce scope of struct recovery *recovery
      6d2d029a
    • Ilya's avatar
      Fix flaky box/session.test.lua · 491ad0c8
      Ilya authored
      Fixes #2198
      491ad0c8
    • Roman Tsisyk's avatar
      net.box: expose pure MessagePack results · 5c59f122
      Roman Tsisyk authored
      Add a new per-request option buffer = <ibuf> to provide a custom buffer
      to store raw MessagePack results:
      
          ibuf = require('buffer').ibuf()
          len = conn.space.name.index:select(key, { buffer = ibuf })
          assert(ibuf.rpos + len == ibuf.wpos)
          ibuf.rpos, result = msgpack.ibuf_decode(ibuf.rpos)
          IPROTO_BODY_KEY = 48
          result[IPROTO_BODY_KEY] -- the same result as original net.box
      
      net.box skips msgpack.decode() on xrow.body and copies raw MessagePack data
      directly to provided buffer. The number of written bytes is returned
      instead of Lua tables.
      
      Closes #2195
      5c59f122
Loading