bytedance / monoio

Rust async runtime based on io-uring.
Apache License 2.0
3.86k stars 215 forks source link

`read_u128_le()` returns `u16` instead of `u128` #261

Closed spetz closed 1 month ago

spetz commented 4 months ago

Hello,

I've started rewriting Iggy.rs into monoio runtime, as I'd like to see the potential benefits of io_uring along with TPC model (and compare the results with existing Tokio runtime), and I've found the following bug? in this line:

https://github.com/bytedance/monoio/blob/5c007dbcfe7c1d2763127f171385a822dd6b6352/monoio/src/io/async_read_rent_ext.rs#L73

It does return u16 instead of u128, while read_i128_le returns i128 - is there any reason why u128 isn't available? We use this for message IDs (e.g. UUID) and would like to stick to u128 if possible.

Cheers and thanks for the great work on this runtime!

ihciah commented 4 months ago

Yes it is a bug, sorry for that. Would like to help fix it?

spetz commented 4 months ago

Apologies for the delayed response, been a quite busy recently. I've seen it was fixed already, thanks @liuxin231 for the quick help!

Xuanwo commented 1 month ago

Thank you @liuxin231, closing now...