arunpandianp commented on code in PR #38919:
URL: https://github.com/apache/beam/pull/38919#discussion_r3648895810


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/work/processing/StreamingWorkScheduler.java:
##########
@@ -398,9 +386,52 @@ private void commitWorkBatch(
       ComputationState computationState,
       List<Work> workBatch,
       List<Windmill.WorkItemCommitRequest> workItemCommits) {
-    checkState(workBatch.size() == 1, "Expected single-key work batch, got: " 
+ workBatch.size());
-    checkState(workBatch.size() == workItemCommits.size());
-    commitSingleKeyWork(computationState, workBatch.get(0), 
workItemCommits.get(0));
+    if (workBatch.isEmpty()) {
+      return;
+    }
+    if (workBatch.size() > 1 || multiKeyBundleOptions.multiKeyBundleEnabled()) 
{

Review Comment:
   The benefit is eventually we can remove the single key code path and have 
only the multikey path. Having one code path on a job also will make debugging 
easier.



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