feat(metadata): thread STM response into consensus Reply body#2856
Open
feat(metadata): thread STM response into consensus Reply body#2856
Conversation
After a metadata state machine commit, the Reply message had an empty body -- mux_stm.update() returned () and the result was discarded. Clients need the response (e.g. assigned IDs) to proceed without a second query. StateHandler::apply now returns Bytes, stored in a last_result field on each *Inner struct during left_right::Absorb (which forces () return). After publish(), the result is read back through ReadHandle and propagated through State -> StateMachine -> MuxSTM into build_reply_message, which now accepts a body parameter and constructs a variable-length BytesMut buffer instead of a header-only transmute. All 19 handlers return Bytes::new() for now.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (5.40%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #2856 +/- ##
============================================
- Coverage 67.94% 67.89% -0.06%
Complexity 739 739
============================================
Files 1049 1049
Lines 84385 84443 +58
Branches 60963 61032 +69
============================================
- Hits 57336 57329 -7
- Misses 24692 24744 +52
- Partials 2357 2370 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a metadata state machine commit, the Reply message had an empty body -- mux_stm.update() returned () and the result was discarded. Clients need the response (e.g. assigned IDs) to proceed without a second query.
StateHandler::apply now returns Bytes, stored in a last_result field on each *Inner struct during
left_right::Absorb (which forces () return). After publish(), the result is read back through ReadHandle and propagated through State -> StateMachine -> MuxSTM into build_reply_message, which now accepts a body parameter and constructs a variable-length BytesMut buffer instead of a header-only transmute.
All 19 handlers return Bytes::new() for now.