Skip to content
Snippets Groups Projects
  1. Mar 22, 2018
    • Vladimir Davydov's avatar
      vinyl: rename vy_index::id to index_id · ee6b868c
      Vladimir Davydov authored
      Throughout Vinyl we use the term 'id' for calling members representing
      unique object identifiers: vy_slice::id, vy_run::id, vy_range::id.
      There's one exception though: vy_index::id is the ordinal number of the
      index in a space. This is confusing. Besides, I'm planning to assign a
      unique id to each vinyl index so that I could look them up in vylog.
      I'd like to call the new member 'id' for consistency. So let's rename
      vy_index::id to index_id.
      ee6b868c
    • Konstantin Osipov's avatar
    • Vladimir Davydov's avatar
      vinyl: refactor vylog recovery · a1c3e5bd
      Vladimir Davydov authored
      The vy_recovery structure was initially designed as opaque to the
      outside world - to iterate over objects stored in it, one is supposed to
      use vy_recovery_iterate(), which invokes the given callback for each
      recovered object encoded as vy_log_record that was used to create it.
      
      Such a design gets extremely difficult to use when we need to preserve
      some context between callback invocations - e.g. see how ugly backup and
      garbage collection procedures look. And it is going to become even more
      obfuscated once we introduce the notion of incomplete indexes (indexes
      that are currently being built by ALTER).
      
      So let's refactor vylog recovery procedure: let's make the vy_recovery
      structure transparent and allow to iterate over internal representations
      of recovered objects directly, without callbacks.
      a1c3e5bd
    • Roman Proskin's avatar
      box: Introduce feedback daemon · 2ae373ae
      Roman Proskin authored
      * feedback daemon sends information about instance to the
        specified host.
      * Add new options to box.cfg:
          - feedback_enabled - switch on/off daemon, default=true.
          - feedback_host - host to which feedbacks are sent,
            default="https://feedback.tarantool.io".
          - feedback_interval - time interval in seconds of feedbacks
          sending, default=3600.
      * Add possibility to generate feedback file in json format with
      function box.feedback.save
      
      Closes #2762
      2ae373ae
    • Ilya's avatar
      fiber: Introduce fiber.join() related methods · 48cad35e
      Ilya authored
      Introduce two functions
      * fiber.new() - create fiber, schedules it into the
      ready queue but doesn't call it and doesn't yield.
      Signature of the method is the same as for fiber.create
      * fiber.join() - waits until the specified fiber finishes
      its execution and returns result or error. Applicable only
      to joinable fibers.
      * fiber.set_joinable() - sets the fiber joinable flag
      
      Closes #1397
      48cad35e
    • Konstantin Osipov's avatar
      Merge branch '1.9' into 1.10 · 021ce483
      Konstantin Osipov authored
      021ce483
    • Konstantin Osipov's avatar
    • Konstantin Osipov's avatar
    • Alec Larson's avatar
      [fio] allow empty path part in pathjoin (#3260) · 49c1de8f
      Alec Larson authored
      Empty strings should be ignored, rather than throw an error.
      
      Passing only empty strings (or nothing) to `pathjoin` will return '.' which means the current directory
      
      Every path part passed to `pathjoin` is now converted to a string
      
      The `gsub('/+', '/')` call already does what the removed code does, so avoid the unnecessary work
      Simply check if the result equals '/' before removing a trailing '/'.
      
      The previous check did extra work for no gain.
      49c1de8f
  2. Mar 21, 2018
  3. Mar 20, 2018
  4. Mar 15, 2018
  5. Mar 13, 2018
  6. Mar 11, 2018
  7. Mar 07, 2018
    • Vladimir Davydov's avatar
      Add Lua function to reset box statistics · 42612ec0
      Vladimir Davydov authored
      This patch adds a new Lua function, box.stat.reset(), which resets
      all incremental box statistic counters, namely box.stat, box.stat.net,
      box.info.vinyl, and index.info. This is useful for performance analysis
      and debugging.
      
      Closes #3198
    • Konstantin Osipov's avatar
    • Vladimir Davydov's avatar
      vinyl: don't track tuples that are already tracked in secondary index · d3d6899a
      Vladimir Davydov authored
      When scanning a secondary index, we actually track each tuple in the
      transaction manager twice - as a part of the interval read from the
      secondary index and as a point in the primary index when retrieving
      the full tuple. This bloats the read set - instead of storing just one
      interval for a range request, we also store each tuple returned by it,
      which may count to thousands. There's no point in this extra tracking,
      because whenever we change a tuple in the primary index, we also update
      it in all secondary indexes. So let's remove it to save us some memory
      and cpu cycles.
      
      This is an alternative fix for #2534
      It should also mitigate #3197
      d3d6899a
    • Vladimir Davydov's avatar
      vinyl: use point lookup explicitly where appropriate · 558d27b2
      Vladimir Davydov authored
      We never use vy_point_lookup directly, instead we open vy_read_iterator,
      which automatically falls back on vy_point_lookup if looking for exact
      match (EQ + full key). Due to this we can't add a new point lookup
      specific argument (we would have to propagate it through the read
      iterator, which is ugly). Let's call vy_point_lookup directly when we
      know that vy_read_iterator will fall back on it anyway.
      558d27b2
    • Vladimir Davydov's avatar
      Revert "vinyl: force read view in iterator in autocommit mode" · ca15907e
      Vladimir Davydov authored
      This reverts commit a31c2c10.
      
      The commit reverted by this patch forces all autocommit SELECTs to open
      a read view immediately, as a result they can't update tuple cache.
      Turned out that one of our customers intensively uses such SELECTs, and
      disabling cache for them results in performance degradation.
      
      The reason why that commit was introduced in the first place was to
      avoid read set bloating for big SELECTs (e.g. space.count()): currently
      we track not only read interval boundaries, but also each tuple fetched
      from the primary index if it is a secondary index that is being scanned.
      However, it doesn't seem that we really need to do that - tracking an
      interval read from a secondary index guarantees that if a tuple returned
      by the iterator is modified the transaction will be aborted and so
      there's no need to track individual tuples read from the primary index.
      
      That said, let's revert this commit and instead remove point lookup
      tracking in case it is a secondary index that is being scanned (done
      later in the series).
      ca15907e
    • Vladislav Shpilevoy's avatar
      vinyl: use vinyl iterators virtuality to remove 'if' in next() · 86d75ecf
      Vladislav Shpilevoy authored
      The first reason of the patch is that vinyl iterators are virtual
      already, and 'if's about constant index attributes (like index->id)
      can be replaced by new next() implementation. Now in next() index->id
      is checked to detect necessity of primary index lookup.
      
      Lets split next() in 2 functions: primary_next() and secondary_next()
      to remove 'if'.
      
      The second reason, that in #2129 logic of secondary index lookup
      complicates a lot. For example, there is raw idea to do not add
      statements into a cache before looking up in a primary index, because
      after #2129 any tuple, read from a secondary index, can be dirty.
      
      Needed for #2129
      86d75ecf
    • Konstantin Osipov's avatar
  8. Mar 06, 2018
    • Georgy Kirichenko's avatar
      Fix flaky test · db3cd7cd
      Georgy Kirichenko authored
      In most cases a tarantool yields on test_run connection and current
      transactions rollback, but some times a tarantool console already has more
      input to execute and select returns different results.
      
      Fixed #3145
      db3cd7cd
    • Vladimir Davydov's avatar
      vinyl: don't handle empty runs in vy_run_iterator_seek · 3a646ef6
      Vladimir Davydov authored
      We don't write empty run files anymore. Remove the dead code.
      3a646ef6
    • Vladimir Davydov's avatar
      vinyl: eliminate current stmt reallocations in run iterator · f632642a
      Vladimir Davydov authored
      Run iterator uses curr_pos (i.e. page number plus offset) as pointer to
      the current position. Whenever it needs to get a statement at curr_pos,
      it calls vy_run_iterator_read(), which allocates a new statement. It
      doesn't try to cache the last allocated statement, which results in
      multiple pointless reallocations of the same statement. For instance,
      vy_run_iterator_next_key() rereads the current statement, then moves to
      the next key, then calls vy_run_iterator_find_lsn(), which rereads the
      current statement again. This is just stupid.
      
      To avoid that, let's keep vy_run_iterator->curr_stmt in sync with
      curr_pos. This simplifies the code quite a bit and makes it more
      efficient.
      f632642a
    • Vladimir Davydov's avatar
      vinyl: zap vy_run_iterator->curr_stmt_pos · 392e4b25
      Vladimir Davydov authored
      vy_run_iterator_get() remembers the position of the last statement
      returned by the iterator in curr_stmt_pos. It then uses it to skip
      a disk read in case it is called again for the same iterator position.
      The code is left from the time when iterators had public virtual
      method 'get', which could be called several times without advancing
      the iterator. Nowadays, vy_run_iterator_get() is never called twice
      for the same iterator position (check coverity scan) so we can zap
      this logic.
      392e4b25
Loading