Skip to content
Snippets Groups Projects
  1. Aug 09, 2017
  2. Aug 08, 2017
  3. Aug 07, 2017
  4. Aug 04, 2017
  5. Aug 03, 2017
  6. Aug 02, 2017
  7. Aug 01, 2017
  8. Jul 31, 2017
    • Vladimir Davydov's avatar
      recovery: do not stall replication on unfinished xlog · da85fd2a
      Vladimir Davydov authored
      recover_remaining_wals() doesn't proceed to the next xlog until the
      current one is finalized (EOF marker is written). As a result, if an
      xlog wasn't finalized for some reason (IO error occurred or tarantool
      was killed in cold blood with SIGKILL), replication will stall on the
      unfinished xlog forever.
      
      To preclude that, let's differentiate WAL write and rotation in WAL
      watcher and force recover_remaining_wals() rescan the WAL directory on
      any WAL rotation so that it will continue to the next WAL even if the
      current one wasn't properly finalized. In case of hot standby, we can't
      reliably detect WAL rotation (e.g. on Mac OS inotify may not work) so
      also rescan the WAL directory every wal_dir_rescan_delay seconds.
      
      Closes #2294
      da85fd2a
    • Vladimir Davydov's avatar
      relay: cleanup error handling · b51b7a0f
      Vladimir Davydov authored
       - Handle cord_costart() errors properly.
       - Don't use scoped_guard as we don't actually need it there.
       - Drop relay_destroy() and rename relay_create() to relay_init().
      b51b7a0f
    • Vladimir Davydov's avatar
      Use cbus for delivering notifications from WAL to relay · 2b5aa3fc
      Vladimir Davydov authored
      Instead of notifying relay about new WALs with ev_async, establish a
      cbus connection between WAL and each relay and send cbus messages after
      wal_write. This is more flexible, because unlike ev_async we can pass
      extra information along with cbus messages, e.g. LSN or event mask.
      
      Closes #2275
      2b5aa3fc
    • Vladimir Davydov's avatar
    • Vladimir Davydov's avatar
      cbus: add pair/unpair helpers · 34a7ec70
      Vladimir Davydov authored
      This patch introduces cbus_pair() and cbus_unpair() helpers to
      pair/unpair two existing cbus endpoints in one function call.
      
      cbus_pair() creates pipes from the caller's cord to the given
      destination and back. It blocks the caller until both pipes are
      created. The caller may specify a callback to be called at the
      destination right after the pipe to the source has been created,
      which may be useful for preparing the destination to receiving
      messages from the source.
      
      cbus_unpair() initiates destruction of pipes created with cbus_pair()
      and blocks the caller until destruction is complete. Since there may
      be messages queued at the destination endpoint when this function is
      called, before proceeding to pipe destruction this function flushes
      all messages at the destination by sending an empty message from the
      source to the destination and back. The caller may specify a callback
      to be invoked by this message at the destination endpoint. This can
      be used to notify the destination that the channel is about to be
      destroyed and it must stop generating new messages.
      34a7ec70
    • Georgy Kirichenko's avatar
      Fix unw_context initialization · 64aab50c
      Georgy Kirichenko authored
      Use local unw_context variable instead of passing a pointer to a backtrace
      function.
      64aab50c
    • Konstantin Osipov's avatar
      box: initialize index_def::cmp_def in index_def constructor · a143212d
      Konstantin Osipov authored
      We're going to need a key def of secondary key augmented
      with key parts from the primary key in memtx engine as well.
      Initialize it when creating struct index_def.
      
      This patch reverts f42e1c15,
      i.e. the fix for gh-2386 (box_index_key_def() as part of module
      API). Exporting this function to C API was premature. Luckily
      it is not used anywhere except 1.8. For 1.8 this patch introduces
      a faster function, space_index_key_def(), which takes a pointer
      to space rather than space id.
      a143212d
    • Konstantin Osipov's avatar
      box: refactor index_def constructor · 15d8bec8
      Konstantin Osipov authored
      In the next patch I plan to add one more parameters to index_def
      constructor, namely the primary key def.
      Refactor the constructor to expect a fully constructed key_def as an
      argument.
      
      The patch happens to simplify the code in schema.cc, cluttered by
      index_def vs. key_def split.
      15d8bec8
    • Roman Tsisyk's avatar
      vinyl: don't limit tuple arena size twice · c504c89f
      Roman Tsisyk authored
      Since 2ab97c01 "introduce vy_stmt_env and vinyl_max_tuple_size option"
      Vinyl's memory is limited both by `struct quota` and `struct vy_quota`.
      This causes sporadic allocation errors because `vy_quota` may
      exceed in some cases.
      
      Closes #2629
      c504c89f
    • Roman Tsisyk's avatar
      xlog: fix incorrect IOV_MAX detection on new libc · 5d4dcc7e
      Roman Tsisyk authored
      sysconf(_SC_IOV_MAX) can return -1 on glibc 2.25.90.
      
      Closes #2637
      5d4dcc7e
  9. Jul 30, 2017
    • Vladislav Shpilevoy's avatar
      schema: forbid creating a space with id = 0 · 857e6429
      Vladislav Shpilevoy authored
      We do not store id = 0 in xlog, yet when parsing the log
      file expect space id to be present in a request (a mandatory key).
      
      So a space with id 0 is not possible to recovery from a
      snapshot.
      
      Simply reserve id 0 to avoid the problem.
      857e6429
  10. Jul 28, 2017
    • Vladimir Davydov's avatar
      box: remove useless region_truncate from box_{space,index}_id_by_name · 14967bd8
      Vladimir Davydov authored
      region_truncate() is not required there as box_index_get() cleans up
      fiber()->gc anyway - see txn_commit_ro_stmt(). Actually, it's even
      dangerous: if fiber_gc() called by box_index_get() happens to free
      memory, region_truncate() will crash on the assertion:
      
        region_truncate: Assertion `region_used(region) >= used' failed.
      14967bd8
Loading