You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the Kafka wire protocol transport review, send_messages returning no offset was identified as a blocker for any Kafka compatibility work. This also benefits Iggy's own SDK users knowing the offset of what you just wrote is a fundamental primitive for exactly-once semantics, deduplication, and position tracking.
Current behavior
send_messages returns an empty OK response. The offset is computed inside append_messages_to_local_partition (messages.rs:332), used to stamp messages and update partition state, then discarded. ShardResponse::SendMessages is a unit variant.
Proposed wire format change
Before: [status:4 LE (0)][length:4 LE (0)]
After: [status:4 LE (0)][length:4 LE (12)][base_offset:8 LE][partition_id:4 LE]
This is backwards compatible for existing SDK clients. The SDK response path in tcp_client.rs:245 reads length bytes then returns them. Current send_messages callers do .await?; Ok(()) — they ignore the body. An old SDK against a new server will silently discard the 12 extra bytes. A new SDK against an old server sees length == 0 and can return a default.
What changes
Server (internal, no external impact):
append_messages_to_local_partition → return Result<u64, IggyError> (the current_offset local variable that already exists)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Following the Kafka wire protocol transport review, send_messages returning no offset was identified as a blocker for any Kafka compatibility work. This also benefits Iggy's own SDK users knowing the offset of what you just wrote is a fundamental primitive for exactly-once semantics, deduplication, and position tracking.
Current behavior
send_messages returns an empty OK response. The offset is computed inside append_messages_to_local_partition (messages.rs:332), used to stamp messages and update partition state, then discarded. ShardResponse::SendMessages is a unit variant.
Proposed wire format change
Before: [status:4 LE (0)][length:4 LE (0)]
After: [status:4 LE (0)][length:4 LE (12)][base_offset:8 LE][partition_id:4 LE]
This is backwards compatible for existing SDK clients. The SDK response path in tcp_client.rs:245 reads length bytes then returns them. Current send_messages callers do .await?; Ok(()) — they ignore the body. An old SDK against a new server will silently discard the 12 extra bytes. A new SDK against an old server sees length == 0 and can return a default.
What changes
Server (internal, no external impact):
SDK trait (separate release):
Questions for maintainers
Beta Was this translation helpful? Give feedback.
All reactions