refactor(sdk): change int attribute to int32 and refactor identifier.#1995
Conversation
chengxilo
commented
Jul 10, 2025
- refactor iggcon.Identifier, to enhance type safe.
- change int => uint32 to align with rust sdk and avoid overflow.
This reverts commit b792869.
|
I didn't change the value type of Length in this PR, I will explain why it should be addressed in the future. For now, I’ve left it as int to ensure the Go SDK can still compile. In the future, we need to provide a function like this to Identifier: iggy/core/common/src/types/identifier/mod.rs Lines 211 to 213 in 09f608f The return type should be uint64, similar to how IggyByteSize is implemented in the Rust SDK: https://github.com/apache/iggy/blob/master/core/common/src/utils/byte_size.rs The entire byte size calculation logic—not just for Identifier—needs to be updated. Currently, we calculate all byte sizes using int, but uint64 would be more appropriate (because rust sdk use uint64). That said, this change would require touching thousands of lines of code across the project, so I believe it’s best handled in a separate PR. |
…apache#1995) 1. refactor iggcon.Identifier, to enhance type safe. 2. change int => uint32 to align with rust sdk and avoid overflow.
…apache#1995) 1. refactor iggcon.Identifier, to enhance type safe. 2. change int => uint32 to align with rust sdk and avoid overflow.