m-trieu commented on code in PR #32905:
URL: https://github.com/apache/beam/pull/32905#discussion_r1826136243
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/WeightedBoundedQueue.java:
##########
@@ -78,24 +69,26 @@ public void put(V value) {
public @Nullable V poll(long timeout, TimeUnit unit) throws
InterruptedException {
V result = queue.poll(timeout, unit);
if (result != null) {
- limit.release(weigher.apply(result));
+ weigher.release(result);
}
return result;
}
/** Returns and removes the next value, or blocks until one is available. */
public @Nullable V take() throws InterruptedException {
V result = queue.take();
- limit.release(weigher.apply(result));
+ weigher.release(result);
return result;
}
/** Returns the current weight of the queue. */
Review Comment:
done
--
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]