fresh-borzoni commented on code in PR #145:
URL: https://github.com/apache/fluss-rust/pull/145#discussion_r2679567895


##########
crates/fluss/src/client/write/accumulator.rs:
##########
@@ -203,6 +208,7 @@ impl RecordAccumulator {
         let mut next_delay = next_ready_check_delay_ms;
 
         for (bucket_id, batch) in batches.batches.iter() {
+            let batch = batch.clone();

Review Comment:
   batch is an Arc<Mutex<_>> now, so the clone is just cloning the Arc. 
   
   We do it to avoid holding a reference into the HashMap/entry guard across 
.lock().await. Cloning gives us an owned handle we can await safely.
   
   every other .await already uses an owned Arc()(.cloned() or scoped entry())



-- 
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]

Reply via email to