Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class HomeBlocksConan(ConanFile):
name = "homeblocks"
version = "6.0.12"
version = "6.0.13"

homepage = "https://github.com/eBay/HomeBlocks"
description = "Block Store built on HomeStore"
Expand Down Expand Up @@ -51,7 +51,7 @@ def build_requirements(self):
self.test_requires("ublkpp/[^0.36]@oss/main")

def requirements(self):
self.requires("homestore/[^8.0]@oss/dev", transitive_headers=True)
self.requires("homestore/[^8.3.5]@oss/dev", transitive_headers=True)
self.requires("iomgr/[^13.0]@oss/dev", transitive_headers=True)
self.requires("sisl/[^14.9]@oss/dev", transitive_headers=True)
self.requires("craft_client/0.4.2@oss/dev", transitive_headers=True) # the extracted CRAFT wire + client + reference
Expand Down
2 changes: 1 addition & 1 deletion docs/craft/subtasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ and enforce single-writer exclusivity without data flowing through the RAFT log.
- RAFT entry carries `{rs_commit_lsn, client_token, empty_slots[]}`
- **Leader pre-resolution:** before proposing `N`, the leader resolves every unresolved slot ≤ `N`: fetch it from any holder, or record an `Empty` verdict on quorum-lacks evidence (leader counts itself; non-responders never count); it must not propose past an unresolved slot
- On apply: `client_token` is carried on the entry but NOT checked against local state -- `SyncRSCommitLSN` applies before the `InternalLogin` that would establish it, so an equality-fence here would make login itself unreachable; ordering plus the term fence on subsequent IO provide exclusivity instead. Mark `empty_slots` Empty, **discarding any local data held there** (reconciliation); if behind, `fetch_data()` the remaining missing slots from peers; then advance `commit_lsn` to the contiguous prefix bounded by `rs_commit_lsn` (skipping `Empty` slots, never past an unresolved `Missing` one). **Apply never truncates** and replicas **never declare Empty unilaterally**
- Peer catch-up (`CraftPeerFetcher::fetch_from_peer`) is **timeout-bounded**: every call passes `peer_fetch_timeout_ms` (`home_blks_config.fbs`, default 5000ms); a peer that misses the deadline is treated as a hard failure, same as any other fetch failure (best-effort — unresolved LSNs stay missing and `commit_lsn` stalls just below the first one). The interface only carries the deadline; enforcing it against a real wire call is S9's (the transport's)
- Peer catch-up (`CraftPeerFetcher::fetch_from_peer`) is **timeout-bounded**: every call passes `peer_fetch_timeout_ms` (`home_blks_config.fbs`, default 5000ms); a peer that misses the deadline is treated as a hard failure, same as any other fetch failure. A failed call does not end catch-up: per the wiki's FetchData loop ("loop until no missing slot ≤ N"), one per-device catch-up worker retries with backoff (100ms doubling, capped at `peer_fetch_timeout_ms`) until every slot ≤ N is filled, and `commit_lsn` stalls just below the first unfilled slot meanwhile. The interface only carries the deadline; enforcing it against a real wire call is S9's (the transport's)
- `append(sync_to, client_token)` proposes this entry via RAFT
- Triggers: periodic every N LSNs (configurable via `home_blks_config.fbs`, default 128), watchdog, login, **client-requested (after a failed sub-quorum write)** — the client's `Resolve` RPC lands on `CraftReplDev::request_resolution(term, upto)`, which runs this same leader pre-resolution and returns the Empty verdicts ≤ `upto` (`craft::resolution_result`). The client broadcasts it to every member (it cannot know the leader mid-session); a follower returns `NOT_LEADER`

Expand Down
580 changes: 465 additions & 115 deletions src/lib/craft/craft_repl_dev.cpp

Large diffs are not rendered by default.

176 changes: 158 additions & 18 deletions src/lib/craft/craft_repl_dev.hpp

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions src/lib/craft/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,23 @@ add_dependencies(test_craft_pre_resolution ${PROJECT_NAME}_core)

add_test(NAME CraftPreResolutionTest COMMAND test_craft_pre_resolution)

# Unit tests for CraftReplDev::append()/request_resolution() and the periodic/watchdog SyncRSCommitLSN
# triggers (S5: SDSTOR-22908). Same pattern: compile craft_repl_dev.cpp directly.
add_executable(test_craft_append)
target_sources(test_craft_append PRIVATE
test_craft_append.cpp
../craft_repl_dev.cpp
)
target_compile_definitions(test_craft_append PRIVATE _PRERELEASE)
target_sources(test_craft_append PRIVATE ${HB_CONFIG_BINDUMP})
target_link_libraries(test_craft_append
${COMMON_TEST_DEPS}
-rdynamic
)
add_dependencies(test_craft_append ${PROJECT_NAME}_core)

add_test(NAME CraftAppendTest COMMAND test_craft_append)

# Heavy integration test for CraftReplDev::commit()/read() against a REAL VolumeIndexTable and real
# data blocks (via a real, ordinarily-created volume) -- same pattern as
# test_craft_homestore_backend.cpp (links the full library, real HomeStore bring-up).
Expand Down
Loading
Loading