Skip to content
Snippets Groups Projects
  1. Sep 01, 2017
    • Vladimir Davydov's avatar
      alter: commit old index drop and new index create on index rebuild · c8ac2d90
      Vladimir Davydov authored
      To rebuild an index when its key def changes, we effectively drop it and
      create a new index instead. Skipping Index::commitDrop and commitCreate
      stages at this point deprives Vinyl of an opportunity to log the change
      in the metadata log and replace the index in the scheduler, which leads
      to a crash. This patch adds the commit stage to RebuildIndex which calls
      the above-mentioned commitDrop and commitCreate for the old and the new
      indexes, respectively.
      
      There is a nuance here. Memtx piggybacks Index::commitDrop to drop space
      tuples when the primary index is dropped. This is actually wrong for
      tuples belong to a space, not to an index. Besides, it prevents us from
      just calling Index::commitDrop() from RebuildIndex::commit() as is,
      because RebuildIndex does not modify space data, it just moves space
      tuples to a new index. To circumvent this, let us remove commitDrop()
      method from MemtxIndex and drop space tuples directly from MemtxSpace's
      commitTruncateSpace() and commitAlterSpace().
      c8ac2d90
  2. Aug 30, 2017
  3. Aug 28, 2017
  4. Aug 24, 2017
    • Vladislav Shpilevoy's avatar
      alter: extract opts_parse_key from opts_create_from_field · 88c3e945
      Vladislav Shpilevoy authored
      In the next patches the field_def will being parsed from space:format.
      Field_def will contain char *name, which is limited by BOX_NAME_MAX = 65000.
      So neither opt_type OPT_STR or OPT_STRPTR can be used to parse this name from
      space:format. Besides, field_def contains enum field_type, which can not
      be parsed using and opt_type.
      Also, field_def will contain default_value, which can store values of
      many types.
      
      Proposal is to use opt_create_from_field not for entire field_def, but only
      for several fields using opts_parse_key. And parse other options
      manualy.
      88c3e945
    • Vladislav Shpilevoy's avatar
      Split key_def.h/.cc · aa549401
      Vladislav Shpilevoy authored
      Needed for #2652
      aa549401
    • Konstantin Osipov's avatar
      test: fix two failing tests · aad99e13
      Konstantin Osipov authored
      replication/cluster.test.py would fail at server exit, because
      at_exit() handler tries to destroy a cbus while its mutex is locked.
      
      args.test.py would fail when run with 'make test'
      aad99e13
  5. Aug 22, 2017
  6. Aug 21, 2017
  7. Aug 19, 2017
  8. Aug 18, 2017
    • Vladimir Davydov's avatar
      vinyl: handle empty run/slice properly · ebf1be88
      Vladimir Davydov authored
      Fix minor issues found by coverity scan:
       - Do not try to estimate slice size if the run is empty to avoid div/0.
       - Fix assert() that is supposed to check slice->first_page_no, but
         checks last_page_no instead.
       - If the slice doesn't intersect with the run (i.e. slice->end is less
         than or equal to run->begin), leave its stats zeroed out.
      ebf1be88
    • Roman Tsisyk's avatar
      Update src/lib/small · 8b26400a
      Roman Tsisyk authored
      Closes #2698
      8b26400a
    • Alexandr Lyapunov's avatar
      vinyl: fix a bug in adding of a cache chain · dd926790
      Alexandr Lyapunov authored
      The bug happens when some TX deletes a statement (writes it to
      its own write set) and then reads a range of tuples containing
      that deleted statement. DELETE must not come to select result
      (in this and only transaction before it is committed) and
      just are skipped by read iterator. After such a skipping and
      getting next true (non-DELETE) statement the iterator considers
      that there is no data between the previous statement and the
      current, and add them to the cache as a chain. This is wrong
      because the data could be hidden by DELETE statement.
      
      Track such jumps over TXW DELETE statements in read iterator and
      do not add statements as a chain in this case.
      dd926790
    • Vladimir Davydov's avatar
      vinyl: do not track partial reads in tx manager · eb5cd536
      Vladimir Davydov authored
      We use a binary tree for tracking reads (read_set). The tree is ordered
      by (index, statement, tx). Insertion of a partial statement into the
      tree may result in breaking comparison transitivity, which is mandated
      by the tree implementation. However, for range requests we insert the
      search key into the read set, which may be partial. This may result in a
      crash in the read_set.
      
      Tracking the search key doesn't make much sense anyway: it doesn't bring
      us any closer to range request tracking, only obscures the semantics of
      select. So let's track only statements actually returned by the iterator
      plus gaps found by point requests.
      
      Closes #2675
      eb5cd536
Loading