[
https://issues.apache.org/jira/browse/TAJO-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14501153#comment-14501153
]
ASF GitHub Bot commented on TAJO-1569:
--------------------------------------
Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/541#discussion_r28642056
--- Diff:
tajo-rpc/tajo-rpc-protobuf/src/main/java/org/apache/tajo/rpc/BlockingRpcClient.java
---
@@ -188,10 +187,12 @@ protected void channelRead0(ChannelHandlerContext
ctx, RpcResponse rpcResponse)
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
throws Exception {
+ /* Current requests will be failed */
for(ProtoCallFuture callback: requests.values()) {
callback.setFailed(cause.getMessage(), cause);
}
-
+ requests.clear();
--- End diff --
I missed the above line, which marks all requests as 'failed'. This code
also seem to be based on the assumption that exceptionCaught does not handle
any recoverable exception. If it is right, please go ahead. Otherwise, we can
fix the bug of TAJO-1569 right now, and we can handle this problem in another
jira.
> BlockingRpcClient can make other request fail
> ---------------------------------------------
>
> Key: TAJO-1569
> URL: https://issues.apache.org/jira/browse/TAJO-1569
> Project: Tajo
> Issue Type: Bug
> Components: client, rpc
> Affects Versions: 0.9.0, 0.10.0
> Reporter: Jinho Kim
> Assignee: Jinho Kim
> Attachments: TAJO-1569.patch
>
>
> A callback is set to fail but It rethrow exception and then other normal
> request is set to fail.
> {noformat}
> Tests run: 23, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 31.131 sec
> <<< FAILURE! - in org.apache.tajo.client.TestTajoClient
> testSelectDatabaseToInvalidOne(org.apache.tajo.client.TestTajoClient) Time
> elapsed: 0.034 sec <<< ERROR!
> com.google.protobuf.ServiceException:
> org.apache.tajo.rpc.TajoServiceException:
> org.apache.tajo.ipc.TajoMasterClientProtocol(127.0.0.1:33642):
> com.google.protobuf.ServiceException:
> org.apache.tajo.catalog.exception.NoSuchDatabaseException: ERROR: database
> "invaliddatabase" does not exist
> at
> org.apache.tajo.rpc.BlockingRpcClient$ProxyRpcChannel.callBlockingMethod(BlockingRpcClient.java:121)
> at
> org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$BlockingStub.getAllDatabases(TajoMasterClientProtocol.java:2163)
> at
> org.apache.tajo.client.CatalogAdminClientImpl$4.call(CatalogAdminClientImpl.java:106)
> at
> org.apache.tajo.client.CatalogAdminClientImpl$4.call(CatalogAdminClientImpl.java:100)
> at
> org.apache.tajo.rpc.ServerCallable.withRetries(ServerCallable.java:86)
> at
> org.apache.tajo.client.CatalogAdminClientImpl.getAllDatabaseNames(CatalogAdminClientImpl.java:99)
> at
> org.apache.tajo.client.TajoClientImpl.getAllDatabaseNames(TajoClientImpl.java:194)
> at
> org.apache.tajo.client.TestTajoClient.testSelectDatabaseToInvalidOne(TestTajoClient.java:145)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)