[
https://issues.apache.org/jira/browse/BEAM-7235?focusedWorklogId=238664&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-238664
]
ASF GitHub Bot logged work on BEAM-7235:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/May/19 17:18
Start Date: 07/May/19 17:18
Worklog Time Spent: 10m
Work Description: lukecwik commented on pull request #8512: [BEAM-7235]
StreamingDataflowWorker creates commit stream only when commit available
URL: https://github.com/apache/beam/pull/8512#discussion_r281737007
##########
File path:
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java
##########
@@ -1459,7 +1459,9 @@ private void streamingCommitLoop() {
Commit commit = null;
while (running.get()) {
// Batch commits as long as there are more and we can fit them in the
current request.
- CommitWorkStream commitStream = streamPool.getStream();
+ // We lazily initialize the commit stream to make sure that we only
create one after
+ // we have a commit.
+ CommitWorkStream commitStream = null;
Review comment:
Why not move this declaration below to line 1492 instead of assigning null
here.
Then you wouldn't have to check if things are null or not.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 238664)
Time Spent: 0.5h (was: 20m)
> GrpcWindmillServer creates commit streams before necessary
> ----------------------------------------------------------
>
> Key: BEAM-7235
> URL: https://issues.apache.org/jira/browse/BEAM-7235
> Project: Beam
> Issue Type: Bug
> Components: runner-dataflow
> Reporter: Sam Whittle
> Assignee: Sam Whittle
> Priority: Minor
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> This can cause spammy logs if there are no commits before the stream deadline
> is reached.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)