Skip to content
Snippets Groups Projects
  1. Oct 24, 2016
  2. Oct 23, 2016
  3. Oct 20, 2016
    • Vladimir Davydov's avatar
      vinyl: read iterator: do not update curr_stmt when jumping to next range · e790c9b5
      Vladimir Davydov authored
      vy_read_iterator->curr_stmt is supposed to store the last statement
      returned by vy_read_iterator_next() to be used for iterator restore.
      However, currently it is also updated in vy_read_iterator_next_range().
      If the iterator is restored after such an update it will skip the first
      statement in the range, which might result in invalid select result. For
      instance, if the first statement (the newest one) in a range is a delete
      followed by an upsert for the same key (which is older), we will skip
      the delete on restore, and return the deleted key, see
      
        vy_read_iterator_restore:
          vy_merge_iterator_restore:
            vy_run_iterator_restore:
      
              if (vy_stmt_compare(fnd, last_stmt->data, itr->index->key_def) == 0) {
                      position_changed = false;
                      if (next_stmt->lsn >= last_stmt->lsn) {
                              /* skip the same stmt to next stmt or older version */
      
      This results in occasional vinyl/options test failures.
      
      Closes #1853
      e790c9b5
    • Vladimir Davydov's avatar
      Merge branch '1.6' into 1.7 · 4e06b8e5
      Vladimir Davydov authored
      Conflicts:
      	test/unit/bps_tree.cc
      	test/unit/bps_tree_iterator.cc
      4e06b8e5
    • Vladimir Davydov's avatar
      Update src/lib/small · 4724bd24
      Vladimir Davydov authored
      Allow to specify allocator context in matras and matras-based data
      structures. After this change, the following salad data structures can
      be passed a custom allocator context: light, rtree, bps_tree.
      4724bd24
    • Roman Tsisyk's avatar
      07d6b4cd
    • Vladimir Davydov's avatar
      vinyl: eliminate reads on recovery · ecd8df95
      Vladimir Davydov authored
      Currently, we use a rather dumb way to determine if a statement from
      xlog should be committed or not on recovery - we lookup the statement in
      all on-disk runs and, if found, compare its lsn. Obviously, this slows
      down the recovery procedure significantly. Actually, we can avoid
      reading on-disk runs altogether. All we need to do is compare the xlog
      statement's lsn with the range's max lsn - we should only commit the
      statement if the former is greater.
      
      Closes #1697
      ecd8df95
    • Vladimir Davydov's avatar
      vinyl: handle eq order in range iterator · 04cb74d6
      Vladimir Davydov authored
      Whenever we need VINYL_EQ order in range iterator, we use VINYL_GE.
      This behavior exists solely due to historical reasons and needs to
      be fixed.
      04cb74d6
    • Vladimir Davydov's avatar
      vinyl: prune deletes on first dump · e4dabd53
      Vladimir Davydov authored
      Currently, we never remove delete statements on dump, even if creating
      the first run. However, there's no point in preserving deletes in case
      there's no on-disk data.
      
      Closes #1823
      e4dabd53
  4. Oct 19, 2016
  5. Oct 18, 2016
    • Konstantin Osipov's avatar
      9a229652
    • Vladislav Shpilevoy's avatar
      0859f06e
    • Vladimir Davydov's avatar
      vinyl: vy_stmt_snprint: prettify output a bit · ce1da83d
      Vladimir Davydov authored
      Surround key and lsn in parentheses.
      ce1da83d
    • Vladimir Davydov's avatar
      vinyl: speed up select in case there are a lot of successive upserts · 5334d990
      Vladimir Davydov authored
      If there are a lot of successive upserts for the same key, select might
      take too long to squash them all. So once the number of upserts exceeds
      a certain threshold, we schedule a fiber to merge them and substitute
      the latest upsert with the resulting replace statement.
      
      Closes #1829
      5334d990
    • Vladimir Davydov's avatar
      vinyl: cleanup range/index version usage · dd983622
      Vladimir Davydov authored
       - Rename vy_index->range_index_version => ->version
                vy_range->range_version => ->version
                vy_merge_iterator->range_index_version => ->index_version
       - Add a comment to vy_range->version
       - Do not increment vy_index->version on dump/compact in case only
         mem/run is added/removed and range index tree is left intact -
         increment vy_range->version instead.
      dd983622
    • Vladimir Davydov's avatar
      vinyl: replace clock_monotonic64 with ev_now · 890068bc
      Vladimir Davydov authored
      ev_now might be significantly faster on some platforms.
      
      Note, latency info is still reported in nanoseconds.
      
      Closes #1566
      890068bc
    • Vladimir Davydov's avatar
      vinyl: cleanup latency reporting · 217ab5cf
      Vladimir Davydov authored
       - rename vy_avg to vy_latency
       - remove ->min as it's going to be ~0 anyway - max and avg is enough
         for giving an insight of what actual latency is like
       - remove ->avg as we can always compute it as ->total / ->count
       - zap temporary buffer used for stat reporting
       - report latency stat in a table instead of string
      217ab5cf
    • Vladimir Davydov's avatar
      vinyl: use rmean for more stat counters · 9cb05434
      Vladimir Davydov authored
      It's good to know not only the total number of events that have happened
      since the server start, but also the average over the last few seconds.
      So let's use rmean for more stat counters:
      
       - VY_STAT_GET: number of reads, including from cursor
         (former vy_stat->get)
       - VY_STAT_TX: number of transactions (former vy_stat->tx)
       - VY_STAT_TX_OPS: number of operations (read or write) issued by
         transactions (formerly, we had vy_stat->tx_stmts, which is the
         average number of operations per transaction)
       - VY_STAT_CURSOR: number of cursors used (former vy_stat->cursor)
       - VY_STAT_CURSOR_OPS: number of reads issued by cursors
         (former vy_stat->cursor_ops)
      
      Also, drop get_read_disk and get_read_cache for now, as they are always
      0. We might want to reintroduce them once we have read cache.
      9cb05434
    • Vladimir Davydov's avatar
      vinyl: simplify info gathering · 8d41565e
      Vladimir Davydov authored
      Instead of creating a temporary storage for vinyl info, we can push it
      to lua immediately as we go. This simplifies the code and makes it
      possible to use strings allocated on stack as keys and values, not just
      literals.
      8d41565e
  6. Oct 17, 2016
Loading