- Apr 29, 2022
-
-
Yaroslav Dynnikov authored
-
- Apr 28, 2022
-
-
Yaroslav Dynnikov authored
We've recently noticed many files in `vendor/` dir have windows-like EOL `crlf`. When cloning the repo, git produces a huge diff due to the EOL normalization built-in feature. This patch disbles it for the certain path.
-
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Sergey V authored
-
- Apr 27, 2022
-
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Georgy Moshkin authored
-
- Apr 26, 2022
-
-
Georgy Moshkin authored
-
- Apr 24, 2022
-
-
Yaroslav Dynnikov authored
We don't want a child process to live without the supervisor. Usually, supervisor waits for child forever and retransmits termination signals. But if the parent is killed with a SIGKILL there's no way to pass anything. This patch supplies a child process with a `supervisor_fuse` fiber. It tries to read from a pipe (that supervisor never writes to), and if the writing end is closed, it means the supervisor has terminated. In this case, child process terminates too. Part of https://git.picodata.io/picodata/picodata/picodata/-/issues/56
-
Yaroslav Dynnikov authored
This patch reduces the variable passing trace length. Instead of returning it from function to function, call `exit()` in place. The trace of exit code before the patch: ``` exit() <- main <- main_run <- fork(child) <- tarantool_main ``` And now: ``` exit() <- tarantool_main ``` Type safety is ensured at comilation time by using `!` type for `fn main()`. See https://doc.rust-lang.org/reference/types/never.html
-
Yaroslav Dynnikov authored
-
-
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 ```
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
- Apr 21, 2022
-
-
Yaroslav Dynnikov authored
1. Remove it from functions args where it's not necessary. 2. In other places rename it into `supervisor_ipc`.
-
Yaroslav Dynnikov authored
-
- Apr 20, 2022
-
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
Since dynamic discovery isn't implemented yet, instance after `raft_join` has discovery uninitialized. It's not a reason to panic.
-
Yaroslav Dynnikov authored
Use common `Notify` instead of a cond. It makes the code more clear and reliable, because each request is tracked individually and can't be affected by different yields in the main_loop.
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
Replace macros with function in `traft::node`.
-
Yaroslav Dynnikov authored
-
- Apr 18, 2022
-
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
Remove prctl dependency that is not available on mac.
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
This pach establishes a friendship between discovery and raft_join.
-
Yaroslav Dynnikov authored
-
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
-