You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "hubcio (via GitHub)" <gi...@apache.org> on 2026/09/28 09:38:57 UTC

[PR] refactor(server): move recovery readers to partitions, add ShardHost [iggy]

hubcio opened a new pull request, #4312:
URL: https://github.com/apache/iggy/pull/4312

   The crash-recovery readers for segments, indexes and consumer
   offsets lived in the server, although core/partitions writes every
   format they read. So each format detail existed in two crates, and
   segment_recovery carried its own copy of the index entry size. The
   shard reached its embedding process through four `Rc<dyn Fn>` slots
   in a struct of closures. A factory layer in dispatch built them, and
   the server and the simulator wired them by hand: a seam with no name
   and no contract.
   
   The readers become crate-independent. They take `&PartitionsConfig`
   for every path, with the consumer offset directories as getters on
   it, and the recovery warning reads the admission limit that the
   partition already enforces. They raise a hand-written
   `PartitionRecoveryError`, which `ServerError` wraps in one
   transparent variant, and they are generic over the bus. They then
   move beside their writers, together with the storage half of
   partition_helpers.rs, as renames with no body change, and the
   mirrored constant gives way to `IGGY_INDEX_SIZE`. The `ServerConfig`
   segment path helpers and their file extension constants lose their
   last callers and go.
   
   The shard crate gets a `ShardHost` trait and a `NoopHost`.
   `IggyShard` holds one `Rc<dyn ShardHost>` and wraps the two
   bus-facing slots into adapters once at construction. The server
   implements the trait as `ServerHost`, which owns what the deleted
   factories used to capture, and re-exports it from `boot` for the
   simulator. The client path gains one vtable hop per frame. Replica
   connections now keep the bus alive through the host's bus clone, as
   client connections already did. `ConnectionContext` turns `pub`
   because `session_manager` is crate-private now.
   
   The metadata state stops leaking its name indexes. `define_state!`
   takes a visibility per field, and the fields that no other crate
   reads turn `pub(crate)`. The login path resolves its user through a
   `UsersInner` method. `Streams` gains `resolve_stream_id` and
   `resolve_topic_ids` for the three gates that each wrapped the same
   lookup, and namespace.rs lists its public resolvers first.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(server): move recovery readers to partitions, add ShardHost [iggy]

Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio merged PR #4312:
URL: https://github.com/apache/iggy/pull/4312


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(server): move recovery readers to partitions, add ShardHost [iggy]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #4312:
URL: https://github.com/apache/iggy/pull/4312#issuecomment-5867401572

   ## [Codecov](https://app.codecov.io/gh/apache/iggy/pull/4312?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 87.38%. Comparing base ([`15a49d0`](https://app.codecov.io/gh/apache/iggy/commit/15a49d082f0350eeb08a60d1c67aaafce89c2e75?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`028d736`](https://app.codecov.io/gh/apache/iggy/commit/028d736a5df99370ba34d01c2c25769a2990df1a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 4 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #4312      +/-   ##
   ============================================
   - Coverage     87.56%   87.38%   -0.18%     
     Complexity     1575     1575              
   ============================================
     Files          1284     1282       -2     
     Lines        225457   224120    -1337     
     Branches     188821   187693    -1128     
   ============================================
   - Hits         197413   195844    -1569     
   - Misses        23309    23573     +264     
   + Partials       4735     4703      -32     
   ```
   
   | [Components](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [Rust Core](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.82% <ø> (+0.07%)` | :arrow_up: |
   | [Java SDK](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.68% <ø> (ø)` | |
   | [C# SDK](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.42% <ø> (ø)` | |
   | [Python SDK](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.97% <ø> (ø)` | |
   | [PHP SDK](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `85.67% <ø> (ø)` | |
   | [Node SDK](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.76% <ø> (-3.99%)` | :arrow_down: |
   | [Go SDK](https://app.codecov.io/gh/apache/iggy/pull/4312/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.05% <ø> (ø)` | |
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/iggy/pull/4312?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [core/configs/src/common/system.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fconfigs%2Fsrc%2Fcommon%2Fsystem.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb25maWdzL3NyYy9jb21tb24vc3lzdGVtLnJz) | `100.00% <ø> (ø)` | |
   | [core/configs/src/server\_config/server.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fconfigs%2Fsrc%2Fserver_config%2Fserver.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb25maWdzL3NyYy9zZXJ2ZXJfY29uZmlnL3NlcnZlci5ycw==) | `91.75% <ø> (-1.97%)` | :arrow_down: |
   | [core/metadata/src/stm/authz.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fmetadata%2Fsrc%2Fstm%2Fauthz.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9tZXRhZGF0YS9zcmMvc3RtL2F1dGh6LnJz) | `88.10% <ø> (+0.81%)` | :arrow_up: |
   | [core/metadata/src/stm/mod.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fmetadata%2Fsrc%2Fstm%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9tZXRhZGF0YS9zcmMvc3RtL21vZC5ycw==) | `84.79% <ø> (ø)` | |
   | [core/metadata/src/stm/stream.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fmetadata%2Fsrc%2Fstm%2Fstream.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9tZXRhZGF0YS9zcmMvc3RtL3N0cmVhbS5ycw==) | `94.09% <ø> (-0.02%)` | :arrow_down: |
   | [core/metadata/src/stm/user.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fmetadata%2Fsrc%2Fstm%2Fuser.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9tZXRhZGF0YS9zcmMvc3RtL3VzZXIucnM=) | `93.16% <ø> (ø)` | |
   | [core/partitions/src/iggy\_index.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fpartitions%2Fsrc%2Figgy_index.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9wYXJ0aXRpb25zL3NyYy9pZ2d5X2luZGV4LnJz) | `92.85% <ø> (ø)` | |
   | [core/partitions/src/iggy\_partition.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fpartitions%2Fsrc%2Figgy_partition.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9wYXJ0aXRpb25zL3NyYy9pZ2d5X3BhcnRpdGlvbi5ycw==) | `92.91% <ø> (-0.01%)` | :arrow_down: |
   | [core/partitions/src/lib.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fpartitions%2Fsrc%2Flib.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9wYXJ0aXRpb25zL3NyYy9saWIucnM=) | `0.00% <ø> (ø)` | |
   | [core/partitions/src/types.rs](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree&filepath=core%2Fpartitions%2Fsrc%2Ftypes.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9wYXJ0aXRpb25zL3NyYy90eXBlcy5ycw==) | `77.35% <ø> (ø)` | |
   | ... and [21 more](https://app.codecov.io/gh/apache/iggy/pull/4312?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   ... and [54 files with indirect coverage changes](https://app.codecov.io/gh/apache/iggy/pull/4312/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org