You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "krishvishal (via GitHub)" <gi...@apache.org> on 2026/03/07 08:12:04 UTC
[PR] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
krishvishal opened a new pull request, #2887:
URL: https://github.com/apache/iggy/pull/2887
Closes #2878
## Rationale
Consensus headers previously stored `Command2` and `Operation` enum values directly in repr(C) structs. This is unsound for consensus header structs: arbitrary bytes from the network are reinterpreted as enum discriminants without validation, which is undefined behavior in Rust.
## What changed?
- Change `command` and `operation` fields in all consensus headers from enum types (`Command2`, `Operation`) to raw `u8` to prevent UB when interpreting untrusted bytes from the network as Rust enum discriminants.
- Add `TryFrom<u8>` impls for `Command2` and `Operation` with proper error variants (`InvalidCommandByte`, `InvalidOperationByte`) in `ConsensusError`.
- Fix `dispatch_request` to return `Result<Receiver<R>, ConsensusError>` instead of silently dropping unrecognized messages.
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #2887:
URL: https://github.com/apache/iggy/pull/2887#discussion_r2911795627
##########
core/common/src/types/consensus/header.rs:
##########
@@ -201,14 +276,15 @@ impl ConsensusHeader for GenericHeader {
const COMMAND: Command2 = Command2::Reserved;
fn operation(&self) -> Operation {
- Operation::Default
+ Operation::Reserved
}
fn command(&self) -> Command2 {
Review Comment:
Done.
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #2887:
URL: https://github.com/apache/iggy/pull/2887#issuecomment-4015925138
## [Codecov](https://app.codecov.io/gh/apache/iggy/pull/2887?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 66.36%. Comparing base ([`ecd7709`](https://app.codecov.io/gh/apache/iggy/commit/ecd77098d215e8ccc0c7ca315b205b13aa8ca6d2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`eb74165`](https://app.codecov.io/gh/apache/iggy/commit/eb74165268c244f977a9406c9777f60d4c0ec0fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #2887 +/- ##
============================================
- Coverage 68.36% 66.36% -2.01%
Complexity 739 739
============================================
Files 1053 978 -75
Lines 84763 78821 -5942
Branches 61297 61039 -258
============================================
- Hits 57948 52309 -5639
+ Misses 24448 24142 -306
- Partials 2367 2370 +3
```
| [Flag](https://app.codecov.io/gh/apache/iggy/pull/2887/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [node](https://app.codecov.io/gh/apache/iggy/pull/2887/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.29% <ø> (-5.12%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files with missing lines](https://app.codecov.io/gh/apache/iggy/pull/2887?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [core/common/src/types/consensus/header.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fcommon%2Fsrc%2Ftypes%2Fconsensus%2Fheader.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb21tb24vc3JjL3R5cGVzL2NvbnNlbnN1cy9oZWFkZXIucnM=) | `24.48% <ø> (+0.91%)` | :arrow_up: |
| [core/common/src/types/consensus/message.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fcommon%2Fsrc%2Ftypes%2Fconsensus%2Fmessage.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb21tb24vc3JjL3R5cGVzL2NvbnNlbnN1cy9tZXNzYWdlLnJz) | `61.98% <ø> (+1.59%)` | :arrow_up: |
| [core/consensus/src/impls.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fconsensus%2Fsrc%2Fimpls.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb25zZW5zdXMvc3JjL2ltcGxzLnJz) | `42.66% <ø> (+0.17%)` | :arrow_up: |
| [core/consensus/src/namespaced\_pipeline.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fconsensus%2Fsrc%2Fnamespaced_pipeline.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb25zZW5zdXMvc3JjL25hbWVzcGFjZWRfcGlwZWxpbmUucnM=) | `97.19% <ø> (-0.01%)` | :arrow_down: |
| [core/consensus/src/plane\_helpers.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fconsensus%2Fsrc%2Fplane_helpers.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9jb25zZW5zdXMvc3JjL3BsYW5lX2hlbHBlcnMucnM=) | `56.04% <ø> (-0.52%)` | :arrow_down: |
| [core/metadata/src/impls/metadata.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fmetadata%2Fsrc%2Fimpls%2Fmetadata.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9tZXRhZGF0YS9zcmMvaW1wbHMvbWV0YWRhdGEucnM=) | `16.15% <ø> (+0.12%)` | :arrow_up: |
| [core/metadata/src/stm/mod.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?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==) | `46.05% <ø> (-0.71%)` | :arrow_down: |
| [core/partitions/src/iggy\_partitions.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fpartitions%2Fsrc%2Figgy_partitions.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9wYXJ0aXRpb25zL3NyYy9pZ2d5X3BhcnRpdGlvbnMucnM=) | `0.00% <ø> (ø)` | |
| [core/shard/src/router.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fshard%2Fsrc%2Frouter.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zaGFyZC9zcmMvcm91dGVyLnJz) | `0.00% <ø> (ø)` | |
| [core/simulator/src/client.rs](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree&filepath=core%2Fsimulator%2Fsrc%2Fclient.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zaW11bGF0b3Ivc3JjL2NsaWVudC5ycw==) | `0.00% <ø> (ø)` | |
| ... and [1 more](https://app.codecov.io/gh/apache/iggy/pull/2887?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
... and [93 files with indirect coverage changes](https://app.codecov.io/gh/apache/iggy/pull/2887/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
Re: [PR] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex merged PR #2887:
URL: https://github.com/apache/iggy/pull/2887
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on PR #2887:
URL: https://github.com/apache/iggy/pull/2887#issuecomment-4022774578
I don't like this solution, rather what we should do is have an private constructor for the `Message`, that is fallable and fails when the `Command` or `Operation` enum is incorrect. On top of that replace the `From` impl that casts one message type to another with an `TryFrom`
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #2887:
URL: https://github.com/apache/iggy/pull/2887#discussion_r2909078476
##########
core/common/src/types/consensus/header.rs:
##########
@@ -449,19 +517,21 @@ impl ConsensusHeader for PrepareOkHeader {
const COMMAND: Command2 = Command2::PrepareOk;
fn operation(&self) -> Operation {
- self.operation
+ Operation::try_from(self.operation).expect("validate() must be called first")
}
fn command(&self) -> Command2 {
Review Comment:
Done.
##########
core/common/src/types/consensus/header.rs:
##########
@@ -124,6 +153,40 @@ pub enum Operation {
Reserved = 200,
}
+impl TryFrom<u8> for Operation {
+ type Error = u8;
+
+ fn try_from(value: u8) -> Result<Self, Self::Error> {
+ match value {
+ 0 => Ok(Operation::Default),
+ 128 => Ok(Operation::CreateStream),
+ 129 => Ok(Operation::UpdateStream),
+ 130 => Ok(Operation::DeleteStream),
+ 131 => Ok(Operation::PurgeStream),
+ 132 => Ok(Operation::CreateTopic),
+ 133 => Ok(Operation::UpdateTopic),
+ 134 => Ok(Operation::DeleteTopic),
+ 135 => Ok(Operation::PurgeTopic),
+ 136 => Ok(Operation::CreatePartitions),
+ 137 => Ok(Operation::DeletePartitions),
+ 138 => Ok(Operation::DeleteSegments),
+ 139 => Ok(Operation::CreateConsumerGroup),
+ 140 => Ok(Operation::DeleteConsumerGroup),
+ 141 => Ok(Operation::CreateUser),
+ 142 => Ok(Operation::UpdateUser),
+ 143 => Ok(Operation::DeleteUser),
+ 144 => Ok(Operation::ChangePassword),
+ 145 => Ok(Operation::UpdatePermissions),
+ 146 => Ok(Operation::CreatePersonalAccessToken),
+ 147 => Ok(Operation::DeletePersonalAccessToken),
+ 160 => Ok(Operation::SendMessages),
+ 161 => Ok(Operation::StoreConsumerOffset),
+ 200 => Ok(Operation::Reserved),
Review Comment:
Done.
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #2887:
URL: https://github.com/apache/iggy/pull/2887#discussion_r2909077947
##########
core/common/src/types/consensus/header.rs:
##########
@@ -449,19 +517,21 @@ impl ConsensusHeader for PrepareOkHeader {
const COMMAND: Command2 = Command2::PrepareOk;
fn operation(&self) -> Operation {
Review Comment:
Done.
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on PR #2887:
URL: https://github.com/apache/iggy/pull/2887#issuecomment-4022983901
EDIT: I've realized that `bytemuck` has some APIs for dealing with such situations - https://docs.rs/bytemuck/latest/bytemuck/checked/trait.CheckedBitPattern.html
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on code in PR #2887:
URL: https://github.com/apache/iggy/pull/2887#discussion_r2911569101
##########
core/common/src/types/consensus/header.rs:
##########
@@ -201,14 +276,15 @@ impl ConsensusHeader for GenericHeader {
const COMMAND: Command2 = Command2::Reserved;
fn operation(&self) -> Operation {
- Operation::Default
+ Operation::Reserved
}
fn command(&self) -> Command2 {
Review Comment:
Do we need to store teh command as u8 on the header, instead of `Command2` enum ?
##########
core/common/src/types/consensus/header.rs:
##########
@@ -201,14 +276,15 @@ impl ConsensusHeader for GenericHeader {
const COMMAND: Command2 = Command2::Reserved;
fn operation(&self) -> Operation {
- Operation::Default
+ Operation::Reserved
}
fn command(&self) -> Command2 {
Review Comment:
We construct the header thgrough the `try_from_bytes` method from bytemuck, which has the validation
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on code in PR #2887:
URL: https://github.com/apache/iggy/pull/2887#discussion_r2904598938
##########
core/common/src/types/consensus/header.rs:
##########
@@ -124,6 +153,40 @@ pub enum Operation {
Reserved = 200,
}
+impl TryFrom<u8> for Operation {
+ type Error = u8;
+
+ fn try_from(value: u8) -> Result<Self, Self::Error> {
+ match value {
+ 0 => Ok(Operation::Default),
+ 128 => Ok(Operation::CreateStream),
+ 129 => Ok(Operation::UpdateStream),
+ 130 => Ok(Operation::DeleteStream),
+ 131 => Ok(Operation::PurgeStream),
+ 132 => Ok(Operation::CreateTopic),
+ 133 => Ok(Operation::UpdateTopic),
+ 134 => Ok(Operation::DeleteTopic),
+ 135 => Ok(Operation::PurgeTopic),
+ 136 => Ok(Operation::CreatePartitions),
+ 137 => Ok(Operation::DeletePartitions),
+ 138 => Ok(Operation::DeleteSegments),
+ 139 => Ok(Operation::CreateConsumerGroup),
+ 140 => Ok(Operation::DeleteConsumerGroup),
+ 141 => Ok(Operation::CreateUser),
+ 142 => Ok(Operation::UpdateUser),
+ 143 => Ok(Operation::DeleteUser),
+ 144 => Ok(Operation::ChangePassword),
+ 145 => Ok(Operation::UpdatePermissions),
+ 146 => Ok(Operation::CreatePersonalAccessToken),
+ 147 => Ok(Operation::DeletePersonalAccessToken),
+ 160 => Ok(Operation::SendMessages),
+ 161 => Ok(Operation::StoreConsumerOffset),
+ 200 => Ok(Operation::Reserved),
Review Comment:
We have both `Operation::Default` and `Operation::Reserved`, I don't think so there is a good reason for that, rather we should make Default = Reserved
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on code in PR #2887:
URL: https://github.com/apache/iggy/pull/2887#discussion_r2904675267
##########
core/common/src/types/consensus/header.rs:
##########
@@ -124,6 +153,40 @@ pub enum Operation {
Reserved = 200,
}
+impl TryFrom<u8> for Operation {
+ type Error = u8;
+
+ fn try_from(value: u8) -> Result<Self, Self::Error> {
+ match value {
+ 0 => Ok(Operation::Default),
+ 128 => Ok(Operation::CreateStream),
+ 129 => Ok(Operation::UpdateStream),
+ 130 => Ok(Operation::DeleteStream),
+ 131 => Ok(Operation::PurgeStream),
+ 132 => Ok(Operation::CreateTopic),
+ 133 => Ok(Operation::UpdateTopic),
+ 134 => Ok(Operation::DeleteTopic),
+ 135 => Ok(Operation::PurgeTopic),
+ 136 => Ok(Operation::CreatePartitions),
+ 137 => Ok(Operation::DeletePartitions),
+ 138 => Ok(Operation::DeleteSegments),
+ 139 => Ok(Operation::CreateConsumerGroup),
+ 140 => Ok(Operation::DeleteConsumerGroup),
+ 141 => Ok(Operation::CreateUser),
+ 142 => Ok(Operation::UpdateUser),
+ 143 => Ok(Operation::DeleteUser),
+ 144 => Ok(Operation::ChangePassword),
+ 145 => Ok(Operation::UpdatePermissions),
+ 146 => Ok(Operation::CreatePersonalAccessToken),
+ 147 => Ok(Operation::DeletePersonalAccessToken),
+ 160 => Ok(Operation::SendMessages),
+ 161 => Ok(Operation::StoreConsumerOffset),
+ 200 => Ok(Operation::Reserved),
Review Comment:
I see, that `Default` is used by the `fn operation(&self) -> Operation` as default implementation, I think we should return reserved in that case as that's what it's purpose is.
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on code in PR #2887:
URL: https://github.com/apache/iggy/pull/2887#discussion_r2904544970
##########
core/common/src/types/consensus/header.rs:
##########
@@ -449,19 +517,21 @@ impl ConsensusHeader for PrepareOkHeader {
const COMMAND: Command2 = Command2::PrepareOk;
fn operation(&self) -> Operation {
- self.operation
+ Operation::try_from(self.operation).expect("validate() must be called first")
}
fn command(&self) -> Command2 {
Review Comment:
Same for command
##########
core/common/src/types/consensus/header.rs:
##########
@@ -449,19 +517,21 @@ impl ConsensusHeader for PrepareOkHeader {
const COMMAND: Command2 = Command2::PrepareOk;
fn operation(&self) -> Operation {
Review Comment:
In the solution that I've provided we wouoldn't need to use the `TryFrom`, as we would store the enums directly there, but rather the transistion/creation part is where validation would happen.
--
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] fix(consensus): prevent UB from untrusted bytes interpreted as enum discriminants in consensus headers [iggy]
Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on PR #2887:
URL: https://github.com/apache/iggy/pull/2887#issuecomment-4022907482
Since the `Command` exists in our header frame, early validation of that should be trivial as we just need to get the bytes[command_bytes_start..command_bytes_end]. the tricky part is `operation` as this enum has to be lazily validated, it means that we have to eagerly construct the header and then validate whether the value represents correct state, thus the `Operation` enum needs to become a "catch-all" enum.
--
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