Skip to content

Commit 29ac4fe

Browse files
tdoublepnjhill
authored andcommitted
Fix bug in queueing related to under-estimating batch weight
1 parent 6b772b0 commit 29ac4fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

router/src/queue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl<B: BatchType> Queue<B> {
267267
);
268268

269269
// Avoid more granular analysis if possible
270-
if <B>::batch_max_weight(&batch_stats, total_count + 1) > config.weight_limit {
270+
if <B>::batch_max_weight(&next_stats, total_count + 1) > config.weight_limit {
271271
// We aren't sure whether this next request will fit, so populate
272272
// a btree with the current batch of requests, the set of
273273
// requests already evaluated, and this one, and perform more
@@ -428,4 +428,4 @@ impl From<&GenerateParameters> for Option<RequestedDetails> {
428428
top_n_toks: parameters.include_top_n,
429429
})
430430
}
431-
}
431+
}

0 commit comments

Comments
 (0)