spetz commented on code in PR #4387:
URL: https://github.com/apache/iggy/pull/4387#discussion_r4183149407
##########
core/binary_protocol/src/version.rs:
##########
@@ -114,17 +110,15 @@ pub const IGGY_PROTOCOL_VERSION: u32 =
parse_packed_semver(env!("CARGO_PKG_VERSI
// minor/patch = compatible, so MIN derives from the current major instead
// of the current minor. Under 0.x a minor bump may break the wire, so the
// minor-scoped window is correct.
-pub const IGGY_PROTOCOL_VERSION_MIN: u32 = IGGY_PROTOCOL_VERSION & !PATCH_MASK;
-// A 0.0.x crate version would pack MIN to 0, which `EvictionHeader::validate`
-// rejects (window requires min >= 1) -- the server would emit eviction frames
-// that fail its own validation.
-const _: () = assert!(IGGY_PROTOCOL_VERSION_MIN > 0);
+pub const IGGY_PROTOCOL_VERSION_MIN: u32 = pack_protocol_version(0, 11, 1);
Review Comment:
This is still open at bb42eda0. Both `IGGY_PROTOCOL_VERSION` and
`IGGY_PROTOCOL_VERSION_MIN` remain `pack_protocol_version(0, 11, 1)` at
`core/binary_protocol/src/version.rs:103` and
`core/binary_protocol/src/version.rs:116`, so a pre-PR client built from
`0.11.1-edge.1` still passes the gate at
`core/server/src/dispatch/session_ops.rs:1114`, and `decode_after_prefix` reads
its username, password and context bytes as the 32-byte bind secret at
`core/binary_protocol/src/requests/users/login_register.rs:146`. That client
gets `MalformedLogin`, or `InvalidCredentials` for a body of 32 bytes or more,
and never `IncompatibleProtocol`. The notes added at
`core/binary_protocol/src/version.rs:100` and `core/server/README.md:94`
describe the clash, while
`core/binary_protocol/src/requests/users/login_register.rs:88` itself requires
a version bump for any wire-incompatible change.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]