m-trieu commented on code in PR #32774: URL: https://github.com/apache/beam/pull/32774#discussion_r1810955600
########## runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/GrpcCommitWorkStream.java: ########## @@ -204,17 +224,23 @@ private void flushInternal(Map<Long, PendingRequest> requests) { } } - private void issueSingleRequest(final long id, PendingRequest pendingRequest) { + private void issueSingleRequest(long id, PendingRequest pendingRequest) { StreamingCommitWorkRequest.Builder requestBuilder = StreamingCommitWorkRequest.newBuilder(); requestBuilder .addCommitChunkBuilder() - .setComputationId(pendingRequest.computation) + .setComputationId(pendingRequest.computationId()) .setRequestId(id) - .setShardingKey(pendingRequest.request.getShardingKey()) - .setSerializedWorkItemCommit(pendingRequest.request.toByteString()); + .setShardingKey(pendingRequest.shardingKey()) + .setSerializedWorkItemCommit(pendingRequest.serializedCommit()); StreamingCommitWorkRequest chunk = requestBuilder.build(); synchronized (this) { - pending.put(id, pendingRequest); + synchronized (shutdownLock) { Review Comment: ``` synchronized (shutdownLock) { synchronized (this) { if (!isShutdown()) { pending.put(id, pendingRequest); } else { pendingRequest.abort(); return; } } } // Release shutdown lock before send. try { send(chunk); } catch (IllegalStateException e) { // Stream was broken, request will be retried when stream is reopened. } ``` would need to look like the above -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org