-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hello,
We sometimes have a strange problem. Once in a few days query request to IC hang on and there are no any result, even exception. Bad thing is that I cannot reproduce it in a test.
Here is the information that I have found so far.
Example code:
private byte[] query(String canisterId, Request<byte[]> request) {
final Principal canisterPrincipal = Principal.fromString(canisterId);
final CompletableFuture<Response<byte[]>> responseCompletableFuture = agent.queryRaw(
canisterPrincipal, canisterPrincipal, methodName, request, Optional.empty());
final Response<byte[]> response;
try {
response = responseCompletableFuture.get();
} catch (Throwable e) {
throw new RuntimeException(e);
}
return response.getPayload();
}
Calling method 'responseCompletableFuture.get();' hangs on forever.
Source code - ReplicaApacheHttpTransport
Line 198
client.execute(httpRequest, new FutureCallback<SimpleHttpResponse>() {
@Override
public void completed(SimpleHttpResponse httpResponse) {
...
}
@Override
public void failed(Exception ex) {
...
}
@Override
public void cancelled() {
...
}
});
After calling method 'client.execute' methods of interface FutureCallback (complete, failed and cancelled) not called.
Source code - InternalAbstractHttpAsyncClient (httpclient5-5.1.3.jar)
Line 223
...
executeImmediate(...)
...
void executeImmediate(
final HttpRequest request,
final AsyncEntityProducer entityProducer,
final AsyncExecChain.Scope scope,
final AsyncExecCallback asyncExecCallback) throws HttpException, IOException {
execChain.execute(request, entityProducer, scope, asyncExecCallback);
}
After method execution 'executeImmediate' no any method was called of 'AsyncExecCallback'.
Best regards,
Alexander
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels