Skip to content
Snippets Groups Projects
  1. Oct 26, 2018
    • Vladimir Davydov's avatar
      Merge branch '1.10-features' into 2.1 · 9975ed06
      Vladimir Davydov authored
      9975ed06
    • Vladimir Davydov's avatar
      Merge branch '1.10' into 1.10-features · 9dcc7849
      Vladimir Davydov authored
      9dcc7849
    • Georgy Kirichenko's avatar
      lua: fix tuple cdata collecting · 022a3c50
      Georgy Kirichenko authored
      In some cases luajit does not collect cdata objects which were
      transformed with ffi.cast as tuple_bless does. In consequence, internal
      table with gc callback overflows and then lua crashes. There might be an
      internal luajit issue because it fires only for jitted code. But assigning
      a gc callback before transformation fixes the problem.
      
      Closes #3751
      022a3c50
    • Vladimir Davydov's avatar
      vinyl: do not account bloom filters to runtime quota · e4338cc5
      Vladimir Davydov authored
      Back when bloom filters were introduced, neither box.info.memory() nor
      box.stat.vinyl().memory didn't exist so bloom filters were accounted to
      box.runtime.info().used for lack of a better place. Now, there's no
      point to account them there. In fact, it's confusing, because bloom
      filters are allocated with malloc(), not from the runtime arena, so
      let's drop it.
      e4338cc5
    • Vladimir Davydov's avatar
      vinyl: fix memory leak in slice stream · 0066457c
      Vladimir Davydov authored
      If a tuple read from a run by a slice stream happens to be out of the
      slice bounds, it will never be freed. Fix it.
      
      The leak was introduced by commit c174c985 ("vinyl: implement new
      simple write iterator").
      0066457c
    • AKhatskevich's avatar
      sql: fix fk set null clause · 9c6c4483
      AKhatskevich authored
      After changing behavior of the `IS` operator (#b3a3ddb5),
      `SET NULL` was rewritten to use `EQ` instead. Which doesn't respect
      NULLs.
      
      This commit fixes the null related behavior by emitting logical
      constructions equivalent for this case to old `IS`.
      The new expression works differently than old `IS` for nulls, however
      the difference doesn't change anything, because matched rows are then
      searched in a child table with `EQ` expression which do not match nulls.
      Before:
      `oldval` old_is `newval`
      Now:
      `oldval` is_null or (`newval` is_not_null and `oldval` eq `newval`)
      
      Closes #3645
      9c6c4483
  2. Oct 25, 2018
  3. Oct 24, 2018
    • Vladimir Davydov's avatar
      xlog: turn use_coio argument of xdir_collect_garbage to flags · a198e273
      Vladimir Davydov authored
      So that we can add more flags.
      a198e273
    • Vladimir Davydov's avatar
      vinyl: account disk statements of each type · b2f85642
      Vladimir Davydov authored
      This patch adds a new entry to per index statistics reported by
      index.stat():
      
        disk.statement
          inserts
          replaces
          deletes
          upserts
      
      It shows the number of statements of each type stored in run files.
      The new statistics are persisted in index files. We will need this
      information so that we can force major compaction when there are too
      many DELETE statements accumulated in run files.
      
      Needed for #3225
      b2f85642
    • Vladimir Davydov's avatar
      vinyl: remove useless local var from vy_range_update_compact_priority · 0a158a4d
      Vladimir Davydov authored
      Local variable total_size equals total_stmt_count.bytes_compressed so we
      don't really need it.
      0a158a4d
    • Vladimir Davydov's avatar
      tuple: zap tuple_extra · e65ba254
      Vladimir Davydov authored
      tuple_extra() allows to store arbitrary metadata inside tuples.
      To use it, one should set extra_size when creating a tuple_format.
      It was introduced for storing UPSERT counter or column mask inside
      vinyl statements. Turned out that it wasn't really needed as UPSERT
      counter can be stored on lsregion while column mask doesn't need to
      be stored at all.
      
      Actually, the whole idea of tuple_extra() is rather crooked: why
      would we need it if we can inherit struct tuple instead, as we do
      in case of memtx_tuple and vy_stmt? Accessing an inherited struct
      is much more convenient than using tuple_extra().
      
      So this patch gets rid of tuple_extra(). To do that, it partially
      reverts the following commits:
      
      6c0842e0 vinyl: refactor vy_stmt_alloc()
      74ff46d8 vinyl: add special format for tuples with column mask
      11eb7816 Add extra size to tuple_format->field_map_size
      e65ba254
    • Vladimir Davydov's avatar
      tuple: zap tuple_format_dup · 9b8c3949
      Vladimir Davydov authored
      This function was only used for creating a format for tuples with column
      mask in vinyl. Not needed anymore and can be removed.
      
      Anyway, it doesn't make much sense to duplciate a tuple format, because
      it can be referenced instead. Besides, once JSON indexes are introcued,
      duplicating a tuple format will be really painful. One more reason to
      drop it now.
      9b8c3949
    • Vladimir Davydov's avatar
      vinyl: zap vy_stmt_column_mask and mem_format_with_colmask · 08afd57f
      Vladimir Davydov authored
      Finally, these atrocities are not used anywhere and can be removed.
      08afd57f
    • Vladimir Davydov's avatar
      vinyl: explicitly pass column mask to vy_check_is_unique · dae21083
      Vladimir Davydov authored
      This patch is a preparation for removing vy_stmt_column_mask.
      dae21083
    • Vladimir Davydov's avatar
      vinyl: explicitly pass column mask to vy_tx_set · 3a0ab1e1
      Vladimir Davydov authored
      This patch is a preparation for removing vy_stmt_column_mask.
      3a0ab1e1
    • Vladimir Davydov's avatar
      vinyl: do not use column mask as trigger for turning REPLACE into INSERT · 4b96c8a9
      Vladimir Davydov authored
      If a REPLACE statement was generated by an UPDATE operation that updated
      a column indexed by a secondary key, we can turn it into INSERT when the
      secondary index is dumped, because there can't be an older statement
      with the same key other than DELETE. Currently, we use the statement
      column mask to detect such REPLACEs in the write iterator, but I'm
      planning to get rid of vy_stmt_column_mask so let's instead introduce
      a new statement flag to mark such REPLACEs.
      4b96c8a9
    • Vladimir Davydov's avatar
      vinyl: factor out common code of UPDATE and UPSERT · c6985874
      Vladimir Davydov authored
      This patch introduces a helper function vy_perform_update() that
      performs operations common for UPDATE and UPSERT, namely replaces
      a tuple in a transaction write set.
      c6985874
    • Vladimir Davydov's avatar
      vinyl: move update optimization from write iterator to tx · 9d0ccd66
      Vladimir Davydov authored
      An UPDATE operation is written as DELETE + REPLACE to secondary indexes.
      We write those statements to the memory level even if the UPDATE doesn't
      actually update columns indexed by a secondary key. We filter them out
      in the write iterator when the memory level is dumped. That's what we
      use vy_stmt_column_mask for.
      
      Actually, there's no point to keep those statements until dump - we
      could as well filter them out when the transaction is committed. This
      would even save some memory. This wouldn't hurt read operations, because
      point lookup doesn't work for secondary indexes by design and so we have
      to read all sources, including disk, on every read from a secondary
      index.
      
      That said, let's move update optimization from the write iterator to
      vy_tx_commit. This is a step towards removing vy_stmt_column_mask.
      9d0ccd66
  4. Oct 23, 2018
    • Alexander Turenko's avatar
      xlog: fix sync_is_async xlog option · 55dcde00
      Alexander Turenko authored
      The behaviour change was introduced in cda3cb55: sync_is_async option
      was forgotten to be updated from xdir; sync_interval was forgotten too,
      but was restored in 1900c58b.
      
      The commit fixes the performance regression around 6-14% for average RPS
      on default nosqlbench workload with 30 seconds duration. The additional
      information about benchmarking can be found in #3747.
      
      Thanks to Vladimir Davydov (@locker) for the investigation of the
      cda3cb55 changes.
      
      Closes #3747
      
      (cherry picked from commit cd9cc4c5)
      55dcde00
    • Alexander Turenko's avatar
      xlog: fix sync_is_async xlog option · cd9cc4c5
      Alexander Turenko authored
      The behaviour change was introduced in cda3cb55: sync_is_async option
      was forgotten to be updated from xdir; sync_interval was forgotten too,
      but was restored in 1900c58b.
      
      The commit fixes the performance regression around 6-14% for average RPS
      on default nosqlbench workload with 30 seconds duration. The additional
      information about benchmarking can be found in #3747.
      
      Thanks to Vladimir Davydov (@locker) for the investigation of the
      cda3cb55 changes.
      
      Closes #3747
      cd9cc4c5
  5. Oct 19, 2018
Loading