Skip to content
Snippets Groups Projects
  1. Sep 04, 2017
    • Roman Tsisyk's avatar
      Debian: install /usr/bin/tarantool as lua interpreter · a305d08e
      Roman Tsisyk authored
      Since #1265 tarantool is fully compatible with lua5.1.
      Install /usr/bin/tarantool as /usr/bin/lua alternative.
      
      Closes #2730
      a305d08e
    • Vladimir Davydov's avatar
      test: vinyl/mvcc: check uniqueness constraint for secondary indexes · bb358cbb
      Vladimir Davydov authored
      The check was accidentally broken by commit eb5cd536 ("vinyl: do not
      track partial reads in tx manager"). Add a test case to avoid similar
      screw-ups in future.
      
      See #2716
      bb358cbb
    • Vladimir Davydov's avatar
      test: vinyl/hermitage: test gap locks · baea6c3a
      Vladimir Davydov authored
      There are two cases in the hermitage test that check gap locks - PMP
      (predicate with many preceders) and G4 (anti-dependency cycles). As we
      didn't have gap locks, we used get() to put a non-existent value to the
      conflict set. Now we can use select(*) instead.
      baea6c3a
    • Vladimir Davydov's avatar
      45063496
    • Vladimir Davydov's avatar
      vinyl: track key intervals in conflict manager · 785a1bdb
      Vladimir Davydov authored
      Currently, the conflict manager only tracks keys returned by the read
      iterator, so Vinyl isn't really serializable as select() can return
      phantom records, e.g.
      
        space: {10}, {20}, {30}, {40}, {50}
      
        Transaction 1                         Transaction 2
        -------------                         -------------
        box.begin()
        space:select({30}, {iterator='GE'})
        -- returns {30}, {40}, {50}
                                              box.begin()
                                              box.insert{35}
                                              box.insert{45}
                                              box.insert{55}
                                              box.commit()
        space:select({30}, {iterator='GE'})
        -- returns {30}, {35}, {40}, {45}, {50}, {55};
        -- were it serializable, the transaction would
        -- be sent to read view so that this select()
        -- would return the same set of values as the
        -- previous one
        box.commit()
      
      Besides, tracking individual keys read by a transaction can be very
      expensive from the memory consumption point of view: think of calling
      select(*) on a big space.
      
      So this patch makes the conflict manager track intervals instead of
      individual keys. To achieve that it splits tx_manager->read_set in two:
      
       - vy_tx->read_set. Contains intervals read by a transaction. Needed to
         efficiently search intervals that should be merged with a new one.
         Intervals in this tree cannot intersect.
      
       - vy_index->read_set. Contains intervals read by all transaction from
         an index. Needed to efficiently search transactions that conflict
         with a write. Intervals can intersect.
      
      When vy_tx_track() is called, it first looks up all intervals
      intersecting with the new interval in vy_tx->read_set, removes them, and
      extends the new interval to span them. Then it inserts the new interval
      into both vy_index->read_set and vy_tx->read_set. The vy_index->read_set
      is used on commit to send all transactions that read intervals modified
      by the committed statement to read view.
      
      Note, now we don't differentiate 'gaps', i.e. non-existent keys read by
      a transaction. Gaps were used to avoid aborting a transaction if a
      non-existent key read by it is deleted. We can't track gaps without
      bloating the read set on select(*).
      
      Closes #2671
      785a1bdb
    • Vladimir Davydov's avatar
      vinyl: convert GT/LT to GE/LE for empty key in vy_read_iterator · 1fb352ac
      Vladimir Davydov authored
      Currently, this is done in each plain iterator (run, mem, txw, cache).
      To handle the empty search key the same way as non-empty keys when
      setting a gap lock, this needs to be handled in vy_read_iterator.
      
      Needed for #2671
      1fb352ac
    • Vladimir Davydov's avatar
      vinyl: move ITER_REQ handling from vy_cursor to vy_read_iterator · adefc586
      Vladimir Davydov authored
      To set a gap lock properly, the read iterator needs to discern ITER_REQ
      from ITER_LE, which is used by vy_cursor instead of ITER_REQ.
      
      Needed for #2671
      adefc586
    • Vladimir Davydov's avatar
      f48afd5e
  2. Sep 01, 2017
    • Vladislav Shpilevoy's avatar
      cbus: implement trigger on flush event · 6b860278
      Vladislav Shpilevoy authored
      The trigger is called when the flush callback sends messages to
      the consumer pipe (in cpipe_flush_cb, if messages queue is not empty).
      
      Needed for #946 to send buffers from tx to iproto.
      6b860278
    • 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
  3. Aug 30, 2017
  4. Aug 28, 2017
  5. 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
  6. Aug 22, 2017
  7. Aug 21, 2017
    • Vladislav Shpilevoy's avatar
      schema: fix system space formats · a6128fcd
      Vladislav Shpilevoy authored
      Now system space formats contain conflicts between space:format,
      their index parts and actual tuple fields.
      
      Such formats can not be used to check tuple fields in SQL.
      
      Fix them in order of #2652
      a6128fcd
    • Vladislav Shpilevoy's avatar
      alter: fix error with user auth data processing · 5ac86f76
      Vladislav Shpilevoy authored
      strlen() can not be called on message pack auth data. Besides, auth
      data can be not only string, but also array or map. And if
      array/map is empty, strlen() returns > 0 - it is incorrect.
      
      Needed for #2652
      5ac86f76
    • Roman Tsisyk's avatar
      vinyl: allow to insert tuples bigger than slab size · 833895bd
      Roman Tsisyk authored
      - Use malloc() as a fallback for lsregion for large size
      - Set Vinyl slab_size to 16Mb and don't use vinyl_max_tuple_size
        for calculation
      - Allow dynamic configuration of vinyl_max_tuple_size
      
      A part of #2342
      833895bd
Loading