Skip to content
Snippets Groups Projects
  1. Feb 04, 2022
    • Yaroslav Dynnikov's avatar
      fix: mistake in inner tests runner · 1619b412
      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.
      1619b412
  2. Feb 01, 2022
    • Yaroslav Dynnikov's avatar
      feature: raft message serde traits · 0d8678ab
      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.
      0d8678ab
  3. Jan 31, 2022
  4. Jan 28, 2022
  5. Jan 26, 2022
    • Yaroslav Dynnikov's avatar
      chore: reorganize rust modules · 61ea1dfe
      Yaroslav Dynnikov authored
      For ambiguous concepts (such as Entry, Message) use prefix notation instead of suffixes.
      61ea1dfe
    • Yaroslav Dynnikov's avatar
      Incapsulate raw raft node · c2d6a43c
      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.
      c2d6a43c
    • Yaroslav Dynnikov's avatar
      Refactor stash · f7de661b
      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.
      f7de661b
    • Yaroslav Dynnikov's avatar
      chore: code duplication · 795208c1
      Yaroslav Dynnikov authored
      Use publicly available `tarantool::global_lua` instead of the self-made
      implementation.
      795208c1
  6. Jan 20, 2022
    • Sergey V's avatar
      refactor: traft Storage · caf78484
      Sergey V authored and Yaroslav Dynnikov's avatar Yaroslav Dynnikov committed
      caf78484
    • Yaroslav Dynnikov's avatar
      feature: run inner tests with cargo · 404f7851
      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
      404f7851
    • Sergey V's avatar
      refactoring: move picolib::Message · aa3d29ad
      Sergey V authored and Yaroslav Dynnikov's avatar Yaroslav Dynnikov committed
      Originally it was `picolib::traft::storage::Message`.
      Now it's simply `picolib::Message`.
      aa3d29ad
  7. Jan 19, 2022
  8. Jan 18, 2022
  9. Jan 17, 2022
  10. Dec 28, 2021
  11. Dec 24, 2021
  12. Dec 20, 2021
  13. Dec 14, 2021
  14. Dec 13, 2021
  15. Dec 07, 2021
Loading