jerry-024 commented on code in PR #720:
URL: https://github.com/apache/paimon-rust/pull/720#discussion_r3801831887


##########
crates/paimon/src/vindex/range_reader.rs:
##########
@@ -257,24 +344,43 @@ impl VindexFileReader {
                             .returned_bytes
                             .fetch_add(data.len() as u64, Ordering::Relaxed);
                     }
-                    Ok(data)
+                    sender
+                        .send(Ok((index, data, response_permit)))
+                        .await
+                        .map_err(|_| io::Error::other("vindex range read 
receiver closed"))
                 }
             }))
-            .await;
-            let _ = sender.send(fetched);
+            .buffer_unordered(response_limit);

Review Comment:
   Thanks for catching this. Strict cross-clone start ordering is not a 
contract of this optimization. These clones are internal readers within the 
same Vindex search, and the limiter is intended to enforce the global resource 
bounds (`C` active I/O operations and at most `2C` retained responses), not 
deterministic scheduling between clones.
   
   Adding a shared scheduler solely to preserve start order would add 
contention and complexity without benchmark evidence that it improves query 
tail latency. I therefore removed the flaky ordering test and its test-only 
hook. The implementation intentionally makes no cross-clone start-order 
guarantee; if benchmarks later show starvation or a meaningful tail-latency 
problem, we can add a fair scheduler in a separate, measured change.



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