Skip to content
Snippets Groups Projects
  1. Feb 12, 2024
  2. Apr 19, 2023
  3. Feb 03, 2023
  4. Dec 27, 2022
    • Georgy Moshkin's avatar
      chore: remove itertools from dependencies · f4becf3c
      Georgy Moshkin authored and Georgy Moshkin's avatar Georgy Moshkin committed
      It's a small library whose benefits don't overweight the drawbacks.
      Any additional dependency crate makes the build slower. But itertools in
      particular is harmful because it hides some expensive computations
      behind simple tempting to use functions such as `sorted_by`.
      f4becf3c
  5. Dec 05, 2022
  6. Nov 28, 2022
  7. Nov 22, 2022
  8. Oct 17, 2022
  9. Oct 15, 2022
  10. Jun 30, 2022
  11. 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
  12. Jun 01, 2022
  13. May 31, 2022
    • Georgy Moshkin's avatar
      fix(discovery): fix hanging if some peers don't respond · 4d3116b0
      Georgy Moshkin authored
      Previously the discovery algorithm would try to reach each known peer
      sequentially requiring each consequent request to succeed until the next
      one can be attempted. This would not work in some cases (see test in
      previous commit).
      
      So the new algorithm instead makes a single attempt to reach each peer
      within a round, and if some failed they're retried in the next round of
      requests. This allows overall discovery to succeed in cases when some
      of the initial peers never respond.
      
      Closes #54
      4d3116b0
  14. May 30, 2022
  15. May 13, 2022
  16. Apr 24, 2022
    • Yaroslav Dynnikov's avatar
      chore: pleasure clippy · f15778cf
      Yaroslav Dynnikov authored
      ```console
      $ cargo clippy
         Compiling picodata v0.1.0 (/home/rosik/w/picodata)
      warning: 'tarantool-sys/patches-applied' exists, so patching step is
      skipped
      warning: single-character string constant used as pattern
         --> src/args.rs:194:47
          |
      194 |     let (host, port) = match text.rsplit_once(":") {
          |                                               ^^^ help: try using
      a `char` instead: `':'`
          |
          = note: `#[warn(clippy::single_char_pattern)]` on by default
          = help: for further information visit
      https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
      
      warning: called `cloned().next()` on an `Iterator`. It may be more
      efficient to call `next().cloned()` instead
         --> src/discovery.rs:154:27
          |
      154 |                 let res =
          peers.difference(&self.visited).cloned().next();
          |
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this:
      `peers.difference(&self.visited).next().cloned()`
          |
          = note: `#[warn(clippy::iter_overeager_cloned)]` on by default
          = help: for further information visit
      https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned
      
      warning: you seem to be trying to use `match` for destructuring a single
      pattern. Consider using `if let`
        --> src/ipc.rs:27:9
         |
      27 | /         match rmp_serde::encode::write(&mut self.fd, msg) {
      28 | |             Err(e) => tlog!(Error, "ipc error: {e}"),
      29 | |             Ok(()) => (),
      30 | |         }
         | |_________^ help: try this: `if let Err(e) =
      rmp_serde::encode::write(&mut self.fd, msg) { tlog!(Error, "ipc error:
      {e}") }`
         |
         = note: `#[warn(clippy::single_match)]` on by default
         = help: for further information visit
      https://rust-lang.github.io/rust-clippy/master/index.html#single_match
      
      warning: `picodata` (bin "picodata") generated 3 warnings
          Finished dev [unoptimized + debuginfo] target(s) in 1.41s
      ```
      Verified
      f15778cf
  17. Apr 20, 2022
  18. Apr 18, 2022
  19. Apr 14, 2022
Loading