Skip to content
Snippets Groups Projects
  1. Oct 16, 2020
    • Alexander Turenko's avatar
      lua: don't raise a Lua error from luaT_tuple_new() · ec9a7fa7
      Alexander Turenko authored
      This change fixes incorrect behaviour at tuple serialization error in
      several places: <space_object>:frommap(), <key_def_object>:compare(),
      <merge_source>:select(). See more in #5382.
      
      Disallow creating a tuple from objects on the Lua stack (idx == 0) in
      luaT_tuple_new() for simplicity. There are no such usages in tarantool.
      The function is not exposed yet to the module API. This is only
      necessary in box.tuple.new(), which anyway raises Lua errors by its
      contract.
      
      The better way to implement it would be rewritting of serialization from
      Lua to msgpack without raising Lua errors, but it is labirous work. Some
      day, I hope, I'll return here.
      
      Part of #5273
      Fixes #5382
      Unverified
      ec9a7fa7
    • Alexander Turenko's avatar
      lua: factor out tuple encoding from luaT_tuple_new · 59149d6a
      Alexander Turenko authored
      It simplifies further changes around encoding a tuple: next commits will
      get rid of throwing serialization errors and will expose a function to
      encode a table (or tuple) from the Lua stack on the box region to the
      module API.
      
      Part of #5273
      Part of #5382
      Unverified
      59149d6a
    • Alexander Turenko's avatar
      module api/lua: add luaL_iscdata() function · 6a63b7c0
      Alexander Turenko authored
      It is useful to provide a module specific error when cdata expected, but
      a value of another type is passed.
      
      Alternative would be using of lua_type() to check against LUA_TCDATA,
      but this constant is not exposed for modules. See more in the
      luaL_iscdata() API comment.
      
      Part of #5273
      Unverified
      6a63b7c0
    • Alexander Turenko's avatar
      module api: expose box region · c6117909
      Alexander Turenko authored
      It is the better alternative to linking the small library directly to a
      module. Why not just use the small library in a module?
      
      Functions from an executable are preferred over ones that are shipped in
      a dynamic library (on Linux, Mac OS differs), while a module may use the
      small library directly. It may cause a problem when some functions from
      the library are inlined, but some are not, and those different versions
      of the library offer structures with different layouts. Small library
      symbols may be exported by the tarantool executable after the change of
      default symbols visibility (see [1]). See more details and examples in
      [2].
      
      So it is better to expose so called box region and get rid of all those
      compatibility problems.
      
      [1]: 2.5.0-42-g03790ac55 ('cmake: remove dynamic-list linker option')
      [2]: https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html
      
      Part of #5273
      Unverified
      c6117909
    • Alexander Turenko's avatar
      module api: get rid of typedef redefinitions · a25a3e0d
      Alexander Turenko authored
      Technically C99 forbids it. Clang complains about typedef redefinitions
      when C99 is used (it is default prior to clang 3.6):
      
       | error: redefinition of typedef 'box_tuple_t' is a C11 feature
       |        [-Werror,-Wtypedef-redefinition]
       | error: redefinition of typedef 'box_key_def_t' is a C11 feature
       |        [-Werror,-Wtypedef-redefinition]
      
      The generated module.h file should define a type using typedef once.
      This patch moves extra definitions out of public parts of header files.
      Reordered api headers to place usages of such types after definitions.
      
      Set C99 for the module API test in order to catch problems of this kind
      in a future. Fixed 'unused value' warnings, which appears after the
      change (it is strange that -Wall was not passed here before).
      
      Part of #5273
      Fixes #5313
      Unverified
      a25a3e0d
  2. Oct 15, 2020
    • Alexander V. Tikhonov's avatar
      build: fix Werror warning in src/box/txn.c · 218ac138
      Alexander V. Tikhonov authored
      Found on GCC 4.8.5 on CentOS 7 issue:
      
        build/usr/src/debug/tarantool-2.6.0.144/src/box/txn.c:944:30: error: ‘limbo_entry’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
           if (txn_limbo_wait_complete(&txn_limbo, limbo_entry) < 0)
      
      Set limbo_entry variable to NULL on initialization.
      
      Needed for #4941
      218ac138
  3. Oct 14, 2020
    • Nikita Pettik's avatar
      vinyl: remove squash procedures from source code · 375f2d17
      Nikita Pettik authored
      After previous commit, there's no need in these functions. However,
      someday we may want to reconsider it squash optimization and make it
      work without breaking upsert associativity rule. So to not lost initial
      squash implementation, let's put its removal in a separate patch.
      
      Follow-up #5107
      375f2d17
    • Nikita Pettik's avatar
      vinyl: rework upsert operation · 5a61c471
      Nikita Pettik authored
      Previous upsert implementation had a few drawbacks which led to number
      of various bugs and issues.
      
      Issue #5092 (redundant update operations execution)
      
      In a nutshell, application of upsert(s) (on top of another upsert)
      consists of two actions (see vy_apply_upsert()): execute and squash.
      Consider example:
      
      insert({1, 1})  -- terminal statement, stored on disk
      upsert({1}, {{'-', 2, 20}}) -- old ups1
      upsert({1}, {{'+', 2, 10}}) -- new ups2
      
      'Execute' step takes update operations from the new upsert and combines them
      with key of the old upsert.  {1} + {'+', 2, 10} can't be evaluated since
      key consists of only one field. Note that in case upsert doesn't fold
      into insert the upsert's tuple and the tuple stored in index can be
      different. In our particular case, tuple stored on disk has two fields
      ({1, 1}), so first upsert's update operation can be applied to it:
      {1, 1} + {'+', 2, 10} --> {1, 11}. If upsert's operation can't be executed
      using key of old upsert, we simply continue processing squash step.
      In turn 'squash' is a combination of update operations: arithmetic
      operations are combined so we don't have to store actions over the same
      field; the rest operations - are merged into single array. As a result,
      we get one upsert with squashed operations: upsert({1}, {{'+', 2, -10}}).
      Then vy_apply_upsert() is called again to apply new upsert on the top of
      terminal statement - insert{1, 1}. Since now tuple has second field,
      update operations can be executed and corresponding result is {1, -9}.
      It is the final result of upsert application procedure.
      Now imagine that we have following upserts:
      
      upsert({1, 1}, {{'-', 2, 20}}) -- old ups1
      upsert({1}, {{'+', 2, 10}}) -- new ups2
      
      In this case execution successfully finishes and modifies old upsert's
      tuple: {1, 1} + {'+', 2, 10} --> {1, 11}
      However, we still have to squash/accumulate update operations since they
      may be applied on tuple stored on disk later. After all, we have
      following upsert: upsert({2, 11}, {{'+', 2, -10}}). Then it is applied
      on the top of insert({1, 1}) and we get the same result as in the first
      case - {1, -9}. The only difference is that upsert's tuple was modified.
      As one can see, execution of update operations applied to upsert's tuple
      is redundant in the case index already contains tuple with the same key
      (i.e. when upserts turns into update). Instead, we are able to
      accumulate/squash update operations only. When the last upsert is being
      applied, we can either execute all update operation on tuple fetched
      from index (i.e. upsert is update) OR on tuple specified in the first
      upsert (i.e. first upsert is insert).
      
      Issue #5105 (upsert doesn't follow associative property)
      
      Secondly, current approach breaks associative property: after upsert's
      update operations are merged into one array, part of them (related to
      one upsert) can be skipped, meanwhile the rest - is applied. For
      instance:
      
      -- Index is over second field.
      i = s:create_index('pk', {parts={2, 'uint'}})
      s:replace{1, 2, 3, 'default'}
      s:upsert({2, 2, 2}, {{'=', 4, 'upserted'}})
      -- First update operation modifies primary key, so upsert must be ignored.
      s:upsert({2, 2, 2}, {{'#', 1, 1}, {'!', 3, 1}})
      
      After merging two upserts we get the next one:
      upsert({2, 2, 2}, {{'=', 4, 'upserted'}, {'#', 1, 1}, {'!', 3, 1}}
      
      While we executing update operations, we don't distinguish operations from
      different upserts. Thus, if one operation fails, the rest are ignored
      as well. As a result, first (in general case - all preceding squashed
      upserts) upsert won't be applied, even despite the fact it is
      absolutely correct. What is more, user gets no error/warning concerning
      this fact.
      
      Issue #1622 (no upsert result validation)
      
      After upsert application, there's no check verifying that result
      satisfies space's format: number of fields, their types, overflows etc.
      Due to this tuples violating format may appear in the space, which in
      turn may lead to unpredictable consequences.
      
      To resolve these issues, let's group update operations of each upsert into
      separate array. So that operations related to particular upsert are
      stored in single array. In terms of previous example we will get:
      upsert({2, 2, 2}, {{{'=', 4, 'upserted'}}, {{'#', 1, 1}, {'!', 3, 1}}}
      
      Also note that we don't longer have to apply update operations on tuple
      in vy_apply_upsert() when it comes for two upserts: it can be done once we
      face terminal statement; or if there's no underlying statement (i.e. it is
      delete statement or no statement at all) we apply all update arrays except
      the first one on upsert's tuple. In case one of operations from array
      fail, we skip the rest operations from this array and process to the
      next array. After successful application of update operations of each
      array, we check that the resulting tuple fits into space format. If they
      aren't, we rollback applied operations, log error and moving to the next
      group of operations.
      
      Finally, arithmetic operations are not longer able to be combined: it is
      requirement which is arises from #5105 issue.  Otherwise, result of
      upserts combination might turn out to be inapplicable to the tuple
      stored on disk (e.g. result applied on tuple leads to integer overflow -
      in this case only last upsert leading to overflow must be ignored).
      
      Closes #1622
      Closes #5105
      Closes #5092
      Part of #5107
      5a61c471
    • Vladislav Shpilevoy's avatar
      qsync: reset confirmed lsn in limbo on owner change · 41ba1479
      Vladislav Shpilevoy authored
      Order of LSNs from different instances can be any. It means, that
      if the synchronous transaction limbo changed its owner, the old
      value of maximal confirmed LSN does not make sense. The new owner
      means new LSNs, even less than the previously confirmed LSN of an
      old owner.
      
      The patch resets the confirmed LSN when the owner is changed. No
      specific test for that, as this is a hotfix - tests start fail on
      every run after a new election test was added in the previous
      commit. A test for this bug will be added later.
      
      Part of #5395
      41ba1479
    • Vladislav Shpilevoy's avatar
      raft: auto-commit transactions of the old leader · 4da30149
      Vladislav Shpilevoy authored
      According to Raft, when a new leader is elected, it should finish
      transactions of the old leader. In Raft this is done via adding a
      new transaction originated from the new leader.
      
      In case of Tarantool this can be done without a new transaction
      due to WAL format specifics, and the function doing it is called
      box_clear_synchro_queue().
      
      Before the patch, when a node was elected as a leader, it didn't
      finish the pending transactions. The queue clearance was expected
      to be done by a user. There was no any issue with that, just
      technical debt. The patch fixes it.
      
      Now when a node becomes a leader, it finishes synchronous
      transactions of the old leader. This is done a bit differently
      than in the public box.ctl.clear_synchro_queue().
      
      The public box.ctl.clear_synchro_queue() tries to wait for CONFIRM
      messages, which may be late. For replication_synchro_timeout * 2
      time.
      
      But when a new leader is elected, the leader will ignore all rows
      from all the other nodes, as it thinks it is the only source of
      truth. Therefore it makes no sense to wait for CONFIRMs here, and
      the waiting is omitted.
      
      Closes #5339
      4da30149
    • Vladislav Shpilevoy's avatar
      raft: introduce on_update trigger · 43d42969
      Vladislav Shpilevoy authored
      Raft state machine now has a trigger invoked each time when any of
      the visible Raft attributes is changed: state, term, vote.
      
      The trigger is needed to commit synchronous transactions of an old
      leader, when a new leader is elected. This is done via a trigger
      so as not to depend on box in raft code too much. That would make
      it harder to extract it into a new module later.
      
      The trigger is executed in the Raft worker fiber, so as not to
      stop the state machine transitions anywhere, which currently don't
      contain a single yield. And the synchronous transaction queue
      clearance requires a yield, to write CONFIRM and ROLLBACK records
      to WAL.
      
      Part of #5339
      43d42969
    • Vladislav Shpilevoy's avatar
      raft: new candidate should wait for leader death · 6b43f103
      Vladislav Shpilevoy authored
      When a raft node was configured to be a candidate via
      election_mode, it didn't do anything if there was an active
      leader.
      
      But it should have started monitoring its health in order to
      initiate a new election round when it dies.
      
      The patch fixes this bug. It does not contain a test, because will
      be covered by a test for #5339.
      
      Needed for #5339
      6b43f103
    • Vladislav Shpilevoy's avatar
      raft: factor out the code to wakeup worker fiber · da4998ea
      Vladislav Shpilevoy authored
      Raft has a worker fiber to perform async tasks such as WAL write,
      state broadcast.
      
      The worker was created and woken up from 2 places, leading at
      least to code duplication. The patch wraps it into a new function
      raft_worker_wakeup(), and uses it.
      
      The patch is not need for anything functional, but was created
      while working on #5339 and trying ideas. The patch seems to be
      good refactoring making the code simpler, and therefore it is
      submitted.
      da4998ea
  4. Oct 13, 2020
    • Ilya Kosarev's avatar
      key_def: support composite types extraction · 9a8ac59c
      Ilya Kosarev authored
      key_def didn't support key definitions with array, map, varbinary & any
      fields. Thus they couldn't be extracted with
      key_def_object:extract_key(). Since the restriction existed due to
      impossibility of such types comparison, this patch removes the
      restriction for the fields extraction and only leaves it for
      comparison.
      
      Closes #4538
      9a8ac59c
  5. Oct 12, 2020
    • Vladislav Shpilevoy's avatar
      raft: introduce election_mode configuration option · 24974f36
      Vladislav Shpilevoy authored
      The new option can be one of 3 values: 'off', 'candidate',
      'voter'. It replaces 2 old options: election_is_enabled and
      election_is_candidate. These flags looked strange, that it was
      possible to set candidate true, but disable election at the same
      time. Also it would not look good if we would ever decide to
      introduce another mode like a data-less sentinel node, for
      example. Just for voting.
      
      Anyway, the single option approach looks easier to configure and
      to extend.
      
      - 'off' means the election is disabled on the node. It is the same
        as election_is_enabled = false in the old config;
      
      - 'voter' means the node can vote and is never writable. The same
        as election_is_enabled = true + election_is_candidate = false in
        the old config;
      
      - 'candidate' means the node is a full-featured cluster member,
        which eventually may become a leader. The same as
        election_is_enabled = true + election_is_candidate = true in the
        old config.
      
      Part of #1146
      24974f36
  6. Oct 07, 2020
    • Aleksandr Lyapunov's avatar
      Introduce fselect - formatted select · 0dc72812
      Aleksandr Lyapunov authored
      space:fselect and index:fselect fetch data like ordinal select,
      but formats the result like mysql does - with columns, column
      names etc. fselect converts tuple to strings using json,
      extending with spaces and cutting tail if necessary. It is
      designed for visual analysis of select result and shouldn't
      be used stored procedures.
      
      index:fselect(<key>, <opts>, <fselect_opts>)
      space:fselect(<key>, <opts>, <fselect_opts>)
      
      There are some options that can be specified in different ways:
       - among other common options (<opts>) with 'fselect_' prefix.
         (e.g. 'fselect_type=..')
       - in special <fselect_opts> map (with or without prefix).
       - in global variables with 'fselect_' prefix.
      
      The possible options are:
       - type:
          - 'sql' - like mysql result (default).
          - 'gh' (or 'github' or 'markdown') - markdown syntax, for
            copy-pasting to github.
          - 'jira' - jira table syntax (for copy-pasting to jira).
       - widths: array with desired widths of columns.
       - max_width: limit entire length of a row string, longest fields
         will be cut if necessary. Set to 0 (default) to detect and use
         screen width. Set to -1 for no limit.
       - print: (default - false) - print each line instead of adding
         to result.
       - use_nbsp: (default - true) - add invisible spaces to improve
         readability in YAML output. Not applicabble when print=true.
      
      There is also a pair of shortcuts:
      index/space:gselect - same as fselect, but with type='gh'.
      index/space:jselect - same as fselect, but with type='jira'.
      
      See test/engine/select.test.lua for examples.
      
      Closes #5161
      0dc72812
    • Sergey Kaplun's avatar
      fiber: fix build for disabled fiber top · ab64b120
      Sergey Kaplun authored
      In case when we build without `ENABLE_FIBER_TOP` neither
      `struct fiber` contains `clock_stat` field nor `FIBER_TIME_RES`
      constant is defined.
      This patch adds corresponding ifdef directive to avoid compilation
      errors.
      ab64b120
  7. Oct 06, 2020
  8. Oct 02, 2020
    • Igor Munkin's avatar
      lua: abort trace recording on fiber yield · 2711797b
      Igor Munkin authored
      
      Since Tarantool fibers don't respect Lua coroutine switch mechanism, JIT
      machinery stays unnotified when one lua_State substitutes another one.
      As a result if trace recording hasn't been aborted prior to fiber
      switch, the recording proceeds using the new lua_State and leads to a
      failure either on any further compiler phase or while the compiled trace
      is executed.
      
      This changeset extends <cord_on_yield> routine aborting trace recording
      when the fiber switches to another one. If the switch-over occurs while
      mcode is being run the platform finishes its execution with EXIT_FAILURE
      code and calls panic routine prior to the exit.
      
      Closes #1700
      Fixes #4491
      
      Reviewed-by: default avatarSergey Ostanevich <sergos@tarantool.org>
      Reviewed-by: default avatarVladislav Shpilevoy <v.shpilevoy@tarantool.org>
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      2711797b
    • Igor Munkin's avatar
      fiber: introduce a callback for fibers switch-over · a390ec55
      Igor Munkin authored
      
      Tarantool integrates several complex environments together and there are
      issues occurring at their junction leading to the platform failures.
      E.g. fiber switch-over is implemented outside the Lua world, so when one
      lua_State substitutes another one, main LuaJIT engines, such as JIT and
      GC, are left unnotified leading to the further platform misbehaviour.
      
      To solve this severe integration drawback <cord_on_yield> function is
      introduced. This routine encloses the checks and actions to be done when
      the running fiber yields the execution.
      
      Unfortunately the way callback is implemented introduces a circular
      dependency. Considering linker symbol resolving methods for static build
      an auxiliary translation unit is added to the particular tests mocking
      (i.e. exporting) <cord_on_yield> undefined symbol.
      
      Part of #1700
      Relates to #4491
      
      Reviewed-by: default avatarSergey Ostanevich <sergos@tarantool.org>
      Reviewed-by: default avatarVladislav Shpilevoy <v.shpilevoy@tarantool.org>
      Signed-off-by: default avatarIgor Munkin <imun@tarantool.org>
      a390ec55
  9. Oct 01, 2020
  10. Sep 30, 2020
  11. Sep 29, 2020
    • Vladislav Shpilevoy's avatar
      raft: introduce box.info.election · 15fc8449
      Vladislav Shpilevoy authored
      Box.info.election returns a table of form:
      
          {
              state: <string>,
              term: <number>,
              vote: <instance ID>,
              leader: <instance ID>
          }
      
      The fields correspond to the same named Raft concepts one to one.
      This info dump is supposed to help with the tests, first of all.
      And with investigation of problems in a real cluster.
      
      The API doesn't mention 'Raft' on purpose, to keep it not
      depending specifically on Raft, and not to confuse users who
      don't know anything about Raft (even that it is about leader
      election and synchronous replication).
      
      Part of #1146
      15fc8449
    • Vladislav Shpilevoy's avatar
      raft: introduce state machine · 27399889
      Vladislav Shpilevoy authored
      The commit is a core part of Raft implementation. It introduces
      the Raft state machine implementation and its integration into the
      instance's life cycle.
      
      The implementation follows the protocol to the letter except a few
      important details.
      
      Firstly, the original Raft assumes, that all nodes share the same
      log record numbers. In Tarantool they are called LSNs. But in case
      of Tarantool each node has its own LSN in its own component of
      vclock. That makes the election messages a bit heavier, because
      the nodes need to send and compare complete vclocks of each other
      instead of a single number like in the original Raft. But logic
      becomes simpler. Because in the original Raft there is a problem
      of uncertainty about what to do with records of an old leader
      right after a new leader is elected. They could be rolled back or
      confirmed depending on circumstances. The issue disappears when
      vclock is used.
      
      Secondly, leader election works differently during cluster
      bootstrap, until number of bootstrapped replicas becomes >=
      election quorum. That arises from specifics of replicas bootstrap
      and order of systems initialization. In short: during bootstrap a
      leader election may use a smaller election quorum than the
      configured one. See more details in the code.
      
      Part of #1146
      27399889
    • sergepetrenko's avatar
      raft: relay status updates to followers · 67b60f08
      sergepetrenko authored
      The patch introduces a new type of system message used to notify the
      followers of the instance's raft status updates.
      It's relay's responsibility to deliver the new system rows to its peers.
      The notification system reuses and extends the same row type used to
      persist raft state in WAL and snapshot.
      
      Part of #1146
      Part of #5204
      67b60f08
    • Vladislav Shpilevoy's avatar
      raft: introduce box.cfg.election_* options · 1d329f0b
      Vladislav Shpilevoy authored
      The new options are:
      
      - election_is_enabled - enable/disable leader election (via
        Raft). When disabled, the node is supposed to work like if Raft
        does not exist. Like earlier;
      
      - election_is_candidate - a flag whether the instance can try to
        become a leader. Note, it can vote for other nodes regardless
        of value of this option;
      
      - election_timeout - how long need to wait until election end, in
        seconds.
      
      The options don't do anything now. They are added separately in
      order to keep such mundane changes from the main Raft commit, to
      simplify its review.
      
      Option names don't mention 'Raft' on purpose, because
      - Not all users know what is Raft, so they may not even know it
        is related to leader election;
      - In future the algorithm may change from Raft to something else,
        so better not to depend on it too much in the public API.
      
      Part of #1146
      1d329f0b
    • Vladislav Shpilevoy's avatar
      raft: introduce persistent raft state · 4f0f7c8f
      Vladislav Shpilevoy authored
      The patch introduces a sceleton of Raft module and a method to
      persist a Raft state in snapshot, not bound to any space.
      
      Part of #1146
      4f0f7c8f
    • Vladislav Shpilevoy's avatar
      replication: track registered replica count · 764a548a
      Vladislav Shpilevoy authored
      Struct replicaset didn't store a number of registered replicas.
      Only an array, which was necessary to fullscan each time when want
      to find the count.
      
      That is going to be needed in Raft to calculate election quorum.
      The patch makes the count tracked so as it could be found for
      constant time by simply reading an integer.
      
      Needed for #1146
      764a548a
    • Vladislav Shpilevoy's avatar
      wal: don't touch box.cfg.wal_dir more than once · 40335790
      Vladislav Shpilevoy authored
      Relay.cc and box.cc obtained box.cfg.wal_dir value using
      cfg_gets() call. To initialize WAL and create struct recovery
      objects.
      
      That is not only a bit dangerous (cfg_gets() uses Lua API and can
      throw a Lua error) and slow, but also not necessary - wal_dir
      parameter is constant, it can't be changed after instance start.
      
      It means, the value can be stored somewhere one time and then used
      without Lua.
      
      Main motivation is that the WAL directory path will be needed
      inside relay threads to restart their recovery iterators in the
      Raft patch. They can't use cfg_gets(), because Lua lives in TX
      thread. But can access a constant global variable, introduced in
      this patch (it existed before, but now has a method to get it).
      
      Needed for #1146
      40335790
    • Vladislav Shpilevoy's avatar
      box: introduce summary RO flag · 31dc4faf
      Vladislav Shpilevoy authored
      An instance is writable if box.cfg.read_only is false, and it is
      not orphan. Update of the final read-only state of the instance
      needs to fire read-only update triggers, and notify the engines.
      These 2 flags were easy and cheap to check on each operation, and
      the triggers were easy to use since both flags are stored and
      updated inside box.cc.
      
      That is going to change when Raft is introduced. Raft will add 2
      more checks:
      
        - A flag if Raft is enabled on the node. If it is not, then Raft
          state won't affect whether the instance is writable;
      
        - When Raft is enabled, it will allow writes on a leader only.
      
      It means a check for being read-only would look like this:
      
          is_ro || is_orphan || (raft_is_enabled() && !raft_is_leader())
      
      This is significantly slower. Besides, Raft somehow needs to
      access the read-only triggers and engine API - this looks wrong.
      
      The patch introduces a new flag is_ro_summary. The flag
      incorporates all the read-only conditions into one flag. When some
      subsystem may change read-only state of the instance, it needs to
      call box_update_ro_summary(), and the function takes care of
      updating the summary flag, running the triggers, and notifying the
      engines.
      
      Raft will use this function when its state or config will change.
      
      Needed for #1146
      31dc4faf
    • Vladislav Shpilevoy's avatar
      applier: store instance_id in struct applier · 7c14819f
      Vladislav Shpilevoy authored
      Applier is going to need its numeric ID in order to tell the
      future Raft module who is a sender of a Raft message. An
      alternative would be to add sender ID to each Raft message, but
      this looks like a crutch. Moreover, applier still needs to know
      its numeric ID in order to notify Raft about heartbeats from the
      peer node.
      
      Needed for #1146
      7c14819f
    • Sergey Kaplun's avatar
      httpc: src/httpc.c missed va_end() macro · 90108875
      Sergey Kaplun authored
      Found and fixed not closed va_list 'ap' with cppcheck:
      
      [src/httpc.c:190]: (error) va_list 'ap' was opened but not closed by va_end().
      90108875
  12. Sep 28, 2020
Loading