Skip to content

Conversation

@vax-r
Copy link
Contributor

@vax-r vax-r commented Oct 3, 2025

Summary

According to #2198 , align ID types with the target pointer size "usize" to avoid churny casts and platform-specific inconsistencies. The following id are now being changed

  • stream_id
  • topic_id
  • partition_id
  • consumer_group_id

For some parts revelant for "Identifier", simply cast the type to "u32/u64" directly for now.

Additionally, in order to achieve ".into()" call that pass "usize" to get "IggyByteSize", implement "From" and "From<Option>" for "IggyByteSize".

Related Issue

#2198

According to apache#2198, align ID types with the target pointer size "usize"
to avoid churny casts and platform-specific inconsistencies.
The following id are now being changed
* stream_id
* topic_id
* partition_id
* consumer_group_id

For some parts revelant for "Identifier", simply cast the type
to "u32/u64" directly for now.

Additionally, in order to achieve ".into()" call that pass "usize"
to get "IggyByteSize", implement "From<usize>" and "From<Option<usize>>"
for "IggyByteSize".

Signed-off-by: I Hsin Cheng <[email protected]>
@vax-r vax-r force-pushed the io_uring_tpc_unify_id branch from b171351 to 4c73235 Compare October 3, 2025 13:27
@numinnex
Copy link
Contributor

numinnex commented Oct 6, 2025

Hi, I've took a look at your PR, overall you've changed too much 😄 we wanted to change only the ids of following resources - stream/topics/partitions/consumer_groups on the server, not every single one occurrence of u32 values everywhere. You have to limit the scope of changes only to the server crate and only to the ids of mentioned resources.

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.

2 participants