Skip to content

Conversation

@hubcio
Copy link
Contributor

@hubcio hubcio commented Feb 3, 2026

Handlers had duplicated validation and resolution logic scattered across bypass_auth variants and inline code. Entity writes occurred on any shard, requiring distributed filesystem locks that added complexity and potential for race conditions.

Centralizing execution in shard/execution.rs with pre-resolved entity types (ResolvedStream, ResolvedTopic, etc.) eliminates duplicate code paths and ensures entity file writes happen exclusively on shard0, removing the need for fs_locks entirely.

@hubcio hubcio force-pushed the command-handler-impr branch 2 times, most recently from cf1f888 to b8686a5 Compare February 3, 2026 11:15
@hubcio hubcio marked this pull request as draft February 3, 2026 11:22
@hubcio hubcio force-pushed the command-handler-impr branch 2 times, most recently from 9b711db to a2fb100 Compare February 3, 2026 13:12
@hubcio hubcio marked this pull request as ready for review February 4, 2026 16:59
@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 84.86118% with 289 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.00%. Comparing base (0b4cc90) to head (af6737c).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/server/src/shard/execution.rs 85.39% 9 Missing and 69 partials ⚠️
core/server/src/metadata/reader.rs 90.41% 23 Missing and 23 partials ⚠️
core/server/src/shard/system/utils.rs 79.54% 24 Missing and 3 partials ⚠️
core/server/src/shard/system/messages.rs 61.76% 18 Missing and 8 partials ⚠️
core/server/src/shard/communication.rs 48.88% 20 Missing and 3 partials ⚠️
core/server/src/http/http_shard_wrapper.rs 50.00% 18 Missing and 3 partials ⚠️
core/server/src/shard/system/consumer_offsets.rs 73.97% 18 Missing and 1 partial ⚠️
core/server/src/shard/handlers.rs 81.91% 0 Missing and 17 partials ⚠️
...er/src/binary/handlers/system/get_stats_handler.rs 50.00% 2 Missing and 2 partials ⚠️
core/server/src/http/consumer_offsets.rs 73.33% 0 Missing and 4 partials ⚠️
... and 14 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2669      +/-   ##
==========================================
+ Coverage   68.85%   69.00%   +0.15%     
==========================================
  Files         575      575              
  Lines       55672    55555     -117     
  Branches    55672    55555     -117     
==========================================
+ Hits        38334    38338       +4     
+ Misses      15467    15338     -129     
- Partials     1871     1879       +8     
Flag Coverage Δ
rust 69.00% <84.86%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
core/binary_protocol/src/utils/mapper.rs 79.29% <100.00%> (+0.09%) ⬆️
...s/consumer_groups/create_consumer_group_handler.rs 89.47% <ø> (+26.14%) ⬆️
...s/consumer_groups/delete_consumer_group_handler.rs 89.47% <ø> (+28.75%) ⬆️
...ers/consumer_groups/join_consumer_group_handler.rs 89.47% <ø> (+12.20%) ⬆️
...rs/consumer_groups/leave_consumer_group_handler.rs 89.47% <ø> (+12.20%) ⬆️
.../consumer_offsets/store_consumer_offset_handler.rs 84.61% <100.00%> (+2.56%) ⬆️
.../handlers/messages/flush_unsaved_buffer_handler.rs 80.00% <ø> (ø)
.../binary/handlers/messages/poll_messages_handler.rs 93.10% <100.00%> (-0.75%) ⬇️
.../binary/handlers/messages/send_messages_handler.rs 100.00% <ø> (ø)
...y/handlers/partitions/create_partitions_handler.rs 89.47% <ø> (+12.20%) ⬆️
... and 58 more

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio hubcio force-pushed the command-handler-impr branch 4 times, most recently from 881aa8e to 00a5e41 Compare February 9, 2026 17:07
Handlers had duplicated validation and resolution logic scattered across
bypass_auth variants and inline code. Entity writes occurred on any shard,
requiring distributed filesystem locks that added complexity and potential
for race conditions.

Centralizing execution in shard/execution.rs with pre-resolved entity types
(ResolvedStream, ResolvedTopic, etc.) eliminates duplicate code paths and
ensures entity file writes happen exclusively on shard0, removing the need
for fs_locks entirely.
@hubcio hubcio force-pushed the command-handler-impr branch from 00a5e41 to af6737c Compare February 9, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant