Skip to content
Snippets Groups Projects
  1. Jul 24, 2017
  2. Jul 21, 2017
  3. Jul 20, 2017
  4. Jul 19, 2017
    • Vladimir Davydov's avatar
      vinyl: use LSN from WAL instead of index_opts->lsn in vylog · 26af611f
      Vladimir Davydov authored
      An index can be dropped and then recreated with the same space/index id.
      To discriminate between different incarnations of the same index during
      recovery, we use index LSN stored in index options, as it is supposed to
      be unique. However, the uniqueness property doesn't always hold:
      
       - If two indexes are created from different fibers, they might receive
         the same LSN.
      
       - If an index is created by inserting a record into _index system space
         directly, without using the public API, as it is the case in case of
         logical backup, its LSN might conflict with the LSN of an existing
         index or a previous incarnation of the same index stored in vylog.
      
      These exceptions can result in unrecoverable errors during local
      recovery, like this one:
      
        F> can't initialize storage: Invalid VYLOG file: Duplicate index id 3
      
      Besides, storing LSN in index options is ugly, because LSN isn't a
      user-defined option - it's a part of the implementation.
      
      To fix this issues, let's use the LSN passed to Index::commitCreate,
      i.e. the actual LSN received by the row that created the index. There's
      one problem though: snapshot rows don't store LSNs. However, it doesn't
      mean we can't find the index in vylog corresponding to a snapshot row:
      we just need to look up the index by space_id/index_id instead of LSN
      and then compare the snapshot LSN with the LSN of the last index
      incarnation stored in vylog - if the latter turns out to be less, then
      we need to load the index, otherwise the index is going to be dropped
      and we need to load a dummy index. For more details, see the comment to
      vy_recovery_load_index().
      
      Another issue that needs a clarification is backward compatibility. The
      thing is the LSN written to the index options lags behind the actual LSN
      assigned to the row that created the index by 1. So to preserve backward
      compatibility, we use LSN from index options for legacy indexes that
      have it, while for indexes created after this patch we don't store LSN
      in index options (set it to 0), neither do we use it on recovery (use
      row LSN instead).
      
      Closes #2536
      26af611f
    • Vladimir Davydov's avatar
      box: generate LSNs for rows received during initial join · 7d67ec8a
      Vladimir Davydov authored
      Currently, 0 is passed to Index::commitCreate as index LSN during
      initial join. To stop using index_opts->lsn for identifying indexes in
      Vinyl, we need a unique LSN. So let's install a dummy journal to assign
      fake unique LSNs for rows received on initial join.
      
      Needed for #2536
      7d67ec8a
    • Vladimir Davydov's avatar
      box: propagate LSN to Index:commitCreate · fd99d3ab
      Vladimir Davydov authored
      So that we could use it instead of index_opts::lsn.
      
      On initial recovery pass the snapshot LSN instead as we don't store LSNs
      in memtx snapshot.
      
      Needed for #2536
      fd99d3ab
    • Vladislav Shpilevoy's avatar
    • Vladislav Shpilevoy's avatar
    • Vladislav Shpilevoy's avatar
      iproto: remove IprotoMsgGuard · 699b14e9
      Vladislav Shpilevoy authored
      699b14e9
    • Vladislav Shpilevoy's avatar
      2ab97c01
    • Vladislav Shpilevoy's avatar
      tuple: introduce tuple_arena_create · a2db8f1d
      Vladislav Shpilevoy authored
      Implement tuple_arena_create method to initialize tuple arena and
      quota. This method further will be used to initialize both
      memtx and vinyl arenas.
      
      Write a test showing the limit of vinyl statements size.
      
      Part of #2569
      a2db8f1d
    • Alexandr Lyapunov's avatar
    • Alexandr Lyapunov's avatar
      Fix memleak in iproto port, clean and optimize the code · bd04983a
      Alexandr Lyapunov authored
      Now if an error happens during the first tuple push from port to
      obuf, the port is not actually destroyed - only the first tuple is
      unreferenced.
      
      I believe that port dump must not free any data at all, then once
      a user creates a port he must take the ownership and destroy it in
      the end of usage. That would simplify the user code, especially C++.
      
      Simplify port_dump function and destroy a port in the code that
      creates the port.
      bd04983a
  5. Jul 18, 2017
  6. Jul 17, 2017
  7. Jul 14, 2017
    • Roman Tsisyk's avatar
      Fix compilation problems · 54d06d7b
      Roman Tsisyk authored
      54d06d7b
    • Roman Tsisyk's avatar
      Update .gitignore · 56db5b7a
      Roman Tsisyk authored
      56db5b7a
    • Roman Tsisyk's avatar
      Add minimal viable package manager based on LuaRocks · 9e7c4217
      Roman Tsisyk authored
      Usage:
      
          tarantoolctl rocks install ROCK - install a rock
          tarantoolctl rocks remove ROCK - remove a rock
          tarantoolctl rocks show ROCK - show information about an installed rock
          tarantoolctl rocks search PATTERN - search repository for rocks
          tarantoolctl rocks list - list all installed rocks
      
      There are no other commands, options, configuration files. Our official
      repository (http://rocks.tarantool.org) works out of the box. All rocks
      are installed to ${PWD}/.rocks directory to support separate rocks trees
      per project, as proposed by #2067. Rockspec can use "tarantool >= 1.7.x"
      inside dependencies = {} block to depend on a specific Tarantool version.
      
      LuaRocks has been slightly hacked to support custom configuration
      via site_config.lua. There are no other changes in the upstream code.
      It is not a fork and it isn't going to be a fork. All formats, layouts
      and rockspecs are 100% compatible with the upstream LuaRocks 2017-07-10.
      
      This feature intentionally doesn't have CMake option to disable it,
      because it should be provided on all available platforms out of the box.
      
      Other changes:
      
       * Add ${PWD}/.rocks to default package.path/package.cpath
       * Hack tarantoolctl to display subcommands in --help.
         Currently command line arguments handling are not perfect, but
         it can be fixed only by a new argparse implementation.
      
      Closes #2067
      9e7c4217
    • Roman Tsisyk's avatar
      Export fiber_cond to public C API · 64934db8
      Roman Tsisyk authored
      A part of #1451
      64934db8
    • Roman Tsisyk's avatar
      Rename struct ipc_channel to struct fiber_channel · 1ac6519a
      Roman Tsisyk authored
      No semantic changes.
      
      Needed for #1451
      1ac6519a
    • Roman Tsisyk's avatar
      Rename struct ipc_cond to struct fiber_cond · 5cf26973
      Roman Tsisyk authored
      No semantic changes.
      
      Needed for #1451
      5cf26973
Loading