[
https://issues.apache.org/jira/browse/BEAM-8557?focusedWorklogId=344443&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-344443
]
ASF GitHub Bot logged work on BEAM-8557:
----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Nov/19 17:40
Start Date: 15/Nov/19 17:40
Worklog Time Spent: 10m
Work Description: lukecwik commented on pull request #9991:
[BEAM-8557]Add log for the dropped unknown response
URL: https://github.com/apache/beam/pull/9991#discussion_r346935922
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/BeamFnStateGrpcClientCache.java
##########
@@ -138,12 +138,14 @@ private synchronized void
closeAndCleanUp(RuntimeException cause) {
public void onNext(StateResponse value) {
LOG.debug("Received StateResponse {}", value);
CompletableFuture<StateResponse> responseFuture =
outstandingRequests.remove(value.getId());
- if (responseFuture != null) {
- if (value.getError().isEmpty()) {
- responseFuture.complete(value);
- } else {
- responseFuture.completeExceptionally(new
IllegalStateException(value.getError()));
- }
+ if (responseFuture == null) {
Review comment:
this should be a terminal error on the SDK side where we should close the
control/data/state channel and have the runner restart us
----------------------------------------------------------------
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: 344443)
> Clean up useless null check.
> ----------------------------
>
> Key: BEAM-8557
> URL: https://issues.apache.org/jira/browse/BEAM-8557
> Project: Beam
> Issue Type: Sub-task
> Components: runner-core, sdk-java-harness
> Reporter: sunjincheng
> Assignee: sunjincheng
> Priority: Major
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> I think we do not need null check here:
> [https://github.com/apache/beam/blob/master/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/FnApiControlClient.java#L151]
> Because before the the `onNext` call, the `Future` already put into the queue
> in `handle` method.
>
> I found the test as follows:
> {code:java}
> @Test
> public void testUnknownResponseIgnored() throws Exception{code}
> I do not know why we need test this case? I think it would be better if we
> throw the Exception for an UnknownResponse, otherwise, this may hidden a
> potential bug.
> Please correct me if there anything I misunderstand @kennknowles
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)