Skip to content
Snippets Groups Projects
  1. Jun 20, 2022
  2. Jun 17, 2022
  3. Jun 15, 2022
  4. Jun 06, 2022
    • Georgy Moshkin's avatar
      fix(discovery): don't fail if raft node is ready but leader_id is not · 31bf1bc2
      Georgy Moshkin authored
      If proc_discover is invoked after raft node was initialized but before
      raft leader was elected, it would return an error before this commit.
      Because of that it was impossible to restart the whole cluster at once.
      
      This commit change proc_discover such that in case leader_id is not
      ready, the normal discovery algorithm takes place.
      
      Closes #93
      31bf1bc2
  5. Jun 01, 2022
    • Sergey V's avatar
      feat: --cluster-id parameter · f8ac1dbe
      Sergey V authored
      * Make `--cluster-id` CLI mandatory.
      * Handle cluster_id mismatch in raft_join.
        When an instance attempts to join the cluster and the instances's
        `--instance-id` parameter mismatches the cluster_id of the cluster
        an error is raised inside the raft_join handler.
      f8ac1dbe
  6. May 31, 2022
    • Yaroslav Dynnikov's avatar
      fix: remove unique index on peer_address · a06ff88d
      Yaroslav Dynnikov authored
      The `peer_address` parameter is an inbound address used for
      communication with the peer. It shouldn't be confused with the listen
      address. The persisted `peer_address` may become obsolete due to
      circumstances beyond picodata control (e.g. DNS or IP changes). Thus
      there's no point in its prior validation, including the uniqueness
      check.
      
      There's also no such task as getting peer by peer_address.
      
      To sum up, an index over `peer_address` is useless. It only creates
      problems and causes panics.
      
      Close https://git.picodata.io/picodata/picodata/picodata/-/issues/88
      a06ff88d
  7. May 30, 2022
  8. May 26, 2022
  9. May 23, 2022
  10. May 21, 2022
    • Yaroslav Dynnikov's avatar
      feature: topology module · 955aa02e
      Yaroslav Dynnikov authored
      It encapsulates the logics of a JoinRequest batch processing.
      
      Topology module will be quite important in picodata. This first version
      misses a lot of features, but a few commits later it's going to
      implement quite a lot of logics.
      
      When a new instance is joined - there's one complex thing: raft leader
      has to decide where this new instance is going to be emplaced, i.e. what
      replicaset should it join. There're many different parameters have an
      influence - `repliction_factor`, `failure-domain`, and of course the
      existing topology. So, this new `topology` module must make the decision.
      
      This patch only refactors the current Picodata behavior, and doesn't
      bring new features for its users. Instead, it opens the door to a future
      development.
      
      Also, this patch provides a unit-testing basis for the future features.
      955aa02e
  11. May 20, 2022
  12. May 13, 2022
  13. May 12, 2022
    • Yaroslav Dynnikov's avatar
      chore: refine logging · c01f07df
      Yaroslav Dynnikov authored
      1. Lower log level of connection errors in `netork.rs`.
      2. Give raft fibers a name.
      c01f07df
    • Yaroslav Dynnikov's avatar
      feature: concurrent join requests handling · 9b079eae
      Yaroslav Dynnikov authored
      There were some problems with join requests synchronization. Raft
      forbids proposing a configuration change if there's another one
      uncommitted (see [1]). In that case, it replaces an `EntryConfChange`
      with an `EntryNormal`. It could happen at any time even without bugs in
      code due to the network partitioning, and its the repsonsibility of
      the picodata product to handle it properly.
      
      Earlier, there was no way to wait when raft leaves the joint state. It
      used to slow down cluster assembling and made it race-prone. The waiting
      for the cluster readiness is also important in tests. Some operations
      (the most important amongst them is leader switching) are impossible
      until instance finishes promotion to a voter. For instance, raft rejects
      `MsgTimeoutNow` unless the node is promotable (see [2]). It makes some
      testing scenarios flaky.
      
      This patch introduces new synchronization primitive - `JointStateLatch`.
      The latch is held on the leader and is locked upon
      `raw_node.propose_conf_change()`. It's unlocked only when the second
      (implicit) conf change that represents leaving joint state is committed.
      The latch also tracks the index of the corresponding `EntryConfChange`.
      Even if raft ignores it for any reason, the latch is still unlocked as
      soon as the committed index exceeds the one of the latch.
      
      [1] https://github.com/tikv/raft-rs/blob/v0.6.0/src/raft.rs#L2014-L2026
      [2] https://github.com/tikv/raft-rs/blob/v0.6.0/src/raft.rs#L2314
      
      Close https://git.picodata.io/picodata/picodata/picodata/-/issues/47
      Close https://git.picodata.io/picodata/picodata/picodata/-/issues/53
      9b079eae
    • Yaroslav Dynnikov's avatar
      fix: pytest wait_ready implementation · 7b94717a
      Yaroslav Dynnikov authored
      Waiting for a valid `leader_id` on a node isn't enough. It may already
      have one, but still be a Learner. Instead, the fixture should wait until
      the node is promoted to voter.
      7b94717a
  14. Apr 21, 2022
  15. Apr 20, 2022
  16. Apr 18, 2022
    • Yaroslav Dynnikov's avatar
      Fix clippy warnings · 7bb8aa15
      Yaroslav Dynnikov authored
      7bb8aa15
    • Yaroslav Dynnikov's avatar
      Fix tests · d5c28170
      Yaroslav Dynnikov authored
      d5c28170
    • Yaroslav Dynnikov's avatar
      Squash the huge patch · 10b6eb1c
      Yaroslav Dynnikov authored
      feat: raft peer discovery PoC
      
      chore: prevent C functions from being optimized out
      
      feat: improve peer discovery
      
      fix: fix tests after making instance_id arg mandatory
      
      Smart supevision with fork
      
      Make it work
      
      Under development
      
      IPC messages to supervisor
      
      One more little step: entrypoint enum
      
      Arrange IPC from child to supervisor
      
      Remove tarantool_main macro
      
      Persist snapshot
      
      Fix some fresh bugs
      
      Implement postjoin
      
      Discovery under refactoring
      
      Enhance discovery
      
      Working on discovery
      
      Fix all discovery bugs known so far
      
      Draft join algorithm
      
      Fail applying snapshot
      
      Joining a learner works
      
      Cleanup snapshot generation
      
      Reorganize traft code and call join automatically
      
      Change peer.commit_index type from option to u64
      
      Implement autopromotion to voter
      
      Implement read_index
      
      Take read_index before self-romotion
      
      Cleanup excess logs
      
      Cleanup logs and code
      
      Deep refactoring in progress
      
      Finish refactoring db schema
      
      Embed entries applying inside traft node
      
      Refactor raft node communication
      
      Replace fiber channel with a mailbox, which is a `Vec<_>` + fiber cond.
      It allows to batch raft commands in a more predictable way and makes
      the code less error-prone.
      
      Remove commented code
      
      Simplify raft nodes interaction over net_box
      
      Eliminate `traft::Message` struct because its internals aren't used.
      Instead, serialize `raft::Message` using protobuf.
      
      Batch ConnectionPool requests
      
      1. Send messages in batches.
      2. Allow changing connection uri.
      3. Close unused connections after `inactivity_timeout`.
      
      Enhance the raft node
      
      1. Collect results from raft node
      2. Fix initial bootstrap which used to fail due to fiber race.
      3. Wrap raft storage operations in a transaction.
      
      Bump tarantool module
      
      Add documentation draft
      
      Cleanup warnings
      
      Try fixing tests
      
      Fix test_storage_log
      
      Fix test_traft_pool
      
      Fix luatest single and couple
      
      Start fixing threesome test
      
      Implement concurrent join requests handling
      10b6eb1c
  17. Feb 22, 2022
  18. Feb 21, 2022
  19. Feb 18, 2022
    • Georgy Moshkin's avatar
      build: static linking with tarantool · f77d1e5d
      Georgy Moshkin authored
      + tarantool-sys submodule
      + tarantool-patches directory
      + build.rs build script to patch and build tarantool
      + static linking with tarantool
      + refactoring for cli arguments
      f77d1e5d
Loading