- Feb 14, 2022
-
-
Sergey V authored
-
Yaroslav Dynnikov authored
Module `traft::storage` doesn't panic anymore. Instead, it gracefully returns errors. All unwraps are moved to the calling functions. Also, the code is supplemented by tests, and debug logs are removed.
-
- Feb 11, 2022
-
-
Yaroslav Dynnikov authored
1. Merge `on_ready` handler with the `loop_fn` body into the larger `raft_main` function. 2. Get rid of debug logs.
-
- Feb 10, 2022
-
-
Sergey V authored
-
- Feb 09, 2022
-
-
Yaroslav Dynnikov authored
1. Prefer using `"str".into()` since it's briefer. 2. Preserve `"str".to_owned()` if type inference can't help.
-
- Feb 07, 2022
-
-
Yaroslav Dynnikov authored
-
- Feb 04, 2022
-
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
1. Fix PICOLIB_AUTORUN env var naming. 2. Add an assertion that it works as expected. 3. Show output if listing tests fails. 3. Run inner tests with listen port :0 to avoid "address already in use" errors.
-
- Feb 01, 2022
-
-
Yaroslav Dynnikov authored
It's a part of networking development. Also, this patch refactors error handling introduced in previous commit (see 96aba97a). A single struct is replaced with the enum, common for all `try_from` functions.
-
- Jan 31, 2022
-
-
Yaroslav Dynnikov authored
1. Replace `From` trait for raft::Entry with the `TryFrom`. Fairly handle its errors in the storage. 2. Replace some other unwraps with "expect" with a more clear message. 3. Support all of `raft::EntryType` variants.
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
Run it: ``` PICODATA_RAFT_ID=2 cargo run run ``` This is a pre-requisite for further two-node configuration development. This is a temporary hack until fair joining is implemented. Close https://gitlab.com/picodata/picodata/picodata/-/issues/16
-
Yaroslav Dynnikov authored
1. Trait `From` for `traft::row::Entry` now accepts a value instead of a reference in order to avoid unnecessary clones. A caller makes a clone itself if necessary. 2. Trait `From` implementation for `traft::Message` now accepts a reference instead of a value. Anyway, it uses msgpack under the hood and doesn't affect performance.
-
- Jan 28, 2022
-
-
Yaroslav Dynnikov authored
1. Remove `get_stash` function - it doesn't show anything interesting. 2. Adjust logging levels. Also split log level initialization away from schema.
-
Sergey V authored
-
Sergey V authored
-
- Jan 26, 2022
-
-
Yaroslav Dynnikov authored
For ambiguous concepts (such as Entry, Message) use prefix notation instead of suffixes.
-
Yaroslav Dynnikov authored
This patch eliminates raw raft node dereferencing and redundant use of `borrow_mut()`. Instead, `traft::Node` provides a safe API that communicates with the raw node through the fiber channel. Also, functions `node::new` and `node::start` are merged because keeping them distinct makes no sense.
-
Yaroslav Dynnikov authored
As we recently discovered, Tarantool has a peculiarity - when calling stored procedures with `{language = "C"}` option, it disregards the shared object (`.so` / `.dylib`) already loaded by Lua and makes the second independent `dlopen`. As a result, Lua and C stored procedures can't share state, because even static variables point to different memory locations. As a workaround, this patch provides the API for hiding the state inside `lua_State`. Under the hood, the stash consumes a custom struct and leaks the wrapping box. Inside Lua, it's represented by a userdata, which the `access()` function provides access to.
-
Yaroslav Dynnikov authored
Use publicly available `tarantool::global_lua` instead of the self-made implementation.
-
- Jan 20, 2022
-
-
-
Yaroslav Dynnikov authored
Tarantool specificities make it difficult to set up usual rust tests. Picolib is coupled with tarantool symbols and compiled as a dylib, so it can't be linked to a stand-alone binary. This patch introduces another way of testing. All tests (called inner) are already built into dylib and exposed in the tarantool console: ``` tarantool> picolib.test --- - test_version: 'function: 0x41f32400' test_traft_storage_RaftEntryRow: 'function: 0x41f32550' ... ``` The new integration test `inner.rs` iterates over them and runs each one in a separate tarantool instance. See also: commit 6610e5cb
-
Originally it was `picolib::traft::storage::Message`. Now it's simply `picolib::Message`.
-
- Jan 19, 2022
-
-
Sergey V authored
-
- Jan 18, 2022
-
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
Move tarantool+slog related stuff to a separate module `tlog`. Introduce the `tlog!` macro for easier logging.
-
Yaroslav Dynnikov authored
The clap module we use for parsing command-line arguments allows specifying `default_value`. Unfortunately, it makes impossible to tell if an argument was actually passed. So it always overrides env var with a default value, which is undesirable.
-
Yaroslav Dynnikov authored
-
Sergey V authored
-
- Jan 17, 2022
-
-
Sergey V authored
-
- Dec 28, 2021
-
-
Yaroslav Dynnikov authored
1. Change raft_state schema. Now it's more suitable for updating individual fields of the raft hard state. Close https://gitlab.com/picodata/picodata/picodata/-/issues/13 2. Persist commit and applied indices. Close https://gitlab.com/picodata/picodata/picodata/-/issues/14 3. Rearrange storage code. High cohesion, low coupling, as they teach us.
-
Yaroslav Dynnikov authored
-
- Dec 24, 2021
-
-
Yaroslav Dynnikov authored
-
Yaroslav Dynnikov authored
This patch implements the Storage trait without MemStorage from example. All data is persisted it tarantool spaces. Also, Rust modules are slightly reorganized. Close https://gitlab.com/picodata/picodata/picodata/-/issues/11
-
Yaroslav Dynnikov authored
- There's a fiber which ticks logical clock. - There's a `raft_propose` API exposed in the Tarantool console. Close https://gitlab.com/picodata/picodata/picodata/-/issues/7 Close https://gitlab.com/picodata/picodata/picodata/-/issues/8
-
- Dec 20, 2021
-
-
Yaroslav Dynnikov authored
-