Skip to content
Snippets Groups Projects
  1. Jul 23, 2018
    • Vladimir Davydov's avatar
      Introduce blackhole engine · cdf3ed8f
      Vladimir Davydov authored
      Blackhole is a very simple engine that allows to create spaces that may
      written to, but not read from. It only supports INSERT/REPLACE requests.
      It doesn't support any indexes hence SELECT is impossible. It does check
      space format though and supports on_replace and before_replace triggers.
      
      The whole purpose of this new engine is writing arbitrary rows to WAL
      without storing them anywhere. In particular, we need this engine to
      write deferred DELETEs generated for vinyl spaces to WAL.
      
      Needed for #2129
      cdf3ed8f
    • Vladimir Davydov's avatar
      space: call before_replace trigger even if space has no indexes · 00204b6a
      Vladimir Davydov authored
      Needed for blackhole spaces, which don't support indexes per se, but
      still may have a before_replace trigger installed.
      00204b6a
  2. Jul 21, 2018
    • Vladimir Davydov's avatar
      txn: unify txn_stmt tuples reference counting rules · efed5d7f
      Vladimir Davydov authored
      Currently, the way txn_stmt::old_tuple and new_tuple are referenced
      depends on the engine. For vinyl, the rules are straightforward: if
      txn_stmt::{old_tuple,new_tuple} is not NULL, then the reference to the
      corresponding tuple is elevated. Hence when a transaction is committed
      or rolled back, vinyl calls tuple_unref on both txn_stmt::old_tuple and
      new_tuple. For memtx, things are different: the engine doesn't
      explicitly increment the reference counter of the tuples - it simply
      sets them to the newly inserted tuple and the replaced tuple. On commit,
      the reference counter of the old tuple is decreased to delete the
      replaced tuple, while on rollback the reference counter of the new tuple
      is decreased to delete the new tuple.
      
      Because of this, we can't implement the blackhole engine (aka /dev/null)
      without implementing commit and rollback engine methods - even though
      such an engine doesn't store anything it still has to set the new_tuple
      for on_replace trigger and hence it is responsible for releasing it on
      commit or rollback. Since commit/rollback are rather inappropriate for
      this kind of engine, let's instead unify txn_stmt reference counting
      rules and make txn.c unreference the tuples no matter what engine is.
      This doesn't change vinyl, because it already conforms. For memtx, this
      means that we need to increase the reference counter when we insert a
      new tuple into a space - not a big deal as tuple_ref is almost free.
      efed5d7f
    • Nikita Pettik's avatar
      Rework memtx replace function · d361b1f7
      Nikita Pettik authored
      By now, replace function takes new tuple and old tuple as arguments, instead
      of single txn_stmt. It has been done in order to avoid abusing txn_stmt:
      the only usage was extracting tuples from it.
      As a result, this function can be used by ephemeral tables
      without any patching.
      
      (cherry picked from commit 880712c9)
      d361b1f7
    • Vladimir Davydov's avatar
      Merge sysview_index.[hc] and sysview_engine.[hc] · 44fc192d
      Vladimir Davydov authored
      They are fairly small and closely related so let's merge them and call
      the result sysview.[hc].
      44fc192d
    • Vladimir Davydov's avatar
      Add generic engine, space, index method stubs · 38a27423
      Vladimir Davydov authored
      This should reduce maintenance burden and help us introduce a new
      engine.
      38a27423
    • Vladimir Davydov's avatar
      Include oldest vclock available on the instance in IPROTO_BALLOT · 989bb8f0
      Vladimir Davydov authored
      It will be used to check if a replica fell too much behind its peers and
      so needs to be rebootstrapped.
      
      Needed for #461
      989bb8f0
    • Vladimir Davydov's avatar
      Get rid of IPROTO_SERVER_IS_RO · 0ade0880
      Vladimir Davydov authored
      Not needed anymore as we now use the new IPROTO_VOTE command instead of
      IPROTO_VOTE_DEPRECATED. Let's remove it altogether and reuse its code
      for IPROTO_BALLOT (they are never decoded together so no conflict should
      happen). Worst that can happen is we choose a read-only master when
      bootstrapping an older version of tarantool.
      0ade0880
    • Vladimir Davydov's avatar
      IPROTO_VOTE command - follow-up fixes · 42a0ebfa
      Vladimir Davydov authored
      This patch contains some follow-up fixes for fe8ae607
      ("Introduce IPROTO_VOTE command"):
       - Rename 'status' to 'ballot' everywhere in the comments.
       - Rename IPROTO_REQUEST_VOTE to IPROTO_VOTE_DEPRECATED and
         iproto_reply_request_vote to iproto_reply_vote_deprecated
         to emphasize the fact that this iproto command has been
         deprecated and IPROTO_VOTE should be used instead.
       - Only send an IPROTO_VOTE request to a master if it is
         running tarantool 1.10.1 or newer.
      42a0ebfa
  3. Jul 20, 2018
    • Vladimir Davydov's avatar
      Introduce IPROTO_VOTE command · fe8ae607
      Vladimir Davydov authored
      The new command is supposed to supersede IPROTO_REQUEST_VOTE, which is
      difficult to extend, because it uses the global iproto key namespace.
      The new command returns a map (IPROTO_BALLOT), to which we can add
      various information without polluting the global namespace. Currently,
      the map contains IPROTO_BALLOT_IS_RO and IPROTO_BALLOT_VCLOCK keys,
      but soon it will be added info needed for replica rebootstrap feature.
      
      Needed for #461
      fe8ae607
  4. Jul 19, 2018
  5. Jul 18, 2018
    • Vladimir Davydov's avatar
      xrow: factor out function for decoding vclock · fdb1e715
      Vladimir Davydov authored
      We will need it in other places.
      fdb1e715
    • Vladimir Davydov's avatar
      recovery: clean up WAL dir scan code · 9f1e0f44
      Vladimir Davydov authored
       - Remove extra scan of the WAL directory from local_recovery() - we
         scan the directory in recovery_end_vclock() hence we can skip scan in
         recover_remaining_wals() by passing scan_dir = false.
      
       - Rename recovery_end_vclock() to recovery_scan() to emphasize the fact
         that this function scans the WAL directory. Write a comment to this
         function.
      
       - Add comments to wal.c explaining why we scan the WAL directory there.
      
      Follow-up 0695fbbb ("box: retrieve end vclock before starting local
      recovery").
      9f1e0f44
    • Vladimir Davydov's avatar
      Update test-run · c9bb2492
      Vladimir Davydov authored
      To bring crash_expected option of "start server" command.
      c9bb2492
    • Serge Petrenko's avatar
      Add errors for non-existent privileges and entities. · aecbbfd7
      Serge Petrenko authored
      There were no checks for granting and revoking a non-existent
      privilege or a privilege to a non-existent entity.
      Added the checks, and a test case.
      
      Closes #3417
      aecbbfd7
  6. Jul 17, 2018
  7. Jul 16, 2018
  8. Jul 13, 2018
  9. Jul 12, 2018
  10. Jul 11, 2018
    • Vladimir Davydov's avatar
      box: factor out local recovery function · ab5c8a22
      Vladimir Davydov authored
       - Factor out local_recovery() from box_cfg_xc(). Make it setup
         replication and handle local recovery and hot standby cases.
       - Move replication setup in case of initial bootstrap from box_cfg_xc()
         to bootstrap() to make bootstrap() consistent with local_recovery().
       - Move initial snapshot creation from bootstrap() to bootsrap_master()
         and bootstrap_from_master().
      
      Needed for #461
      ab5c8a22
    • Vladimir Davydov's avatar
      box: connect to remote peers before starting local recovery · 2c32252b
      Vladimir Davydov authored
      box_sync_replication() can now be called before recovery, right after
      box_listen(). This is a step toward detecting if the instance fell too
      much behind its peers in the cluster and so needs to be rebootstrapped.
      
      Needed for #461
      2c32252b
Loading