luoyuxia commented on issue #240: URL: https://github.com/apache/fluss-rust/issues/240#issuecomment-3847929032
@fresh-borzoni Thanks for raising this. It's a great point and definitely worth discussing. I’ve also noticed that append has the same issue. To be honest, I put a lot of thought into whether I should remove .wait() to avoid blocking. The reason I eventually kept the .wait() logic in the append methods was mainly influenced by [rust-rdkafka](https://github.com/fede1024/rust-rdkafka). Their FutureProducer provides a [send method](https://github.com/fede1024/rust-rdkafka/blob/master/examples/asynchronous_processing.rs#L101) that also waits for the ACK. I decided to follow the Kafka-style API as it's a very mature and widely used reference. The one advantage is that users can get the produce result for each produce. That said, I do feel that this API is not the most intuitive to use, and I haven't found many other similar Rust implementations to reference. However, I agree that forcing a .`wait()` inside the method limits our ability to do true pipelining (users have to spawn tasks, so I'm open to refactoring this to enable better concurrent batching. Btw, the `upsert ` make `self` be `mut`, which cause spawn tasks to concurrent put impossible. cc @leekeiabstraction -- 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]
