arunpandianp commented on code in PR #41444:
URL: https://github.com/apache/beam/pull/41444#discussion_r4636944989
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcDirectGetWorkStream.java:
##########
@@ -244,8 +256,11 @@ protected synchronized void onFlushPending(boolean
isNewStream)
if (!isNewStream) {
return;
}
- budgetTracker.reset();
- GetWorkBudget initialGetWorkBudget =
budgetTracker.computeBudgetExtension();
+ // Reset and record initial budget before sending the header so concurrent
updates observe it.
+ BudgetExtension initialExtension =
budgetTracker.resetAndRecordInitialBudget();
+ ((DirectGetWorkPhysicalStreamHandler)
checkNotNull(currentPhysicalStream)).streamEpoch =
Review Comment:
Discussed offline, we'll keep epochs and avoid having to keep a reference to
the Stream longer than required.
--
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]