-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync pull causes DeadlineExceededException #189
Comments
When you say "usually, if a pull times out, it would just return null," what do you mean? As in, that used to be the behavior or that is the behavior you expect? |
IIRC, it was the old behavior when the client library had the idiomatic APIs. It's also the behavior for most of the other messaging APIs other than Pub/Sub. |
We have a user issue that is related to this -- Pub/Sub timing out on a health check, which performs a synchronous pull with What should be done here -- should the user open a support ticket for abnormally high pull latency, or is this a normal scenario, and we should adjust the health check indicator to ignore DEADLINE_EXCEEDED? It feels wrong to ignore, since a too-long latency is a valid indicator of a service problem. |
I'm going to assign this to @anguillanneuf to discuss with Elena and see if we can figure out next steps. |
For me it happens when there is no messages available (v1.90.0) |
Both gcloud and Python will just return nothing or null if there are no messages. The Java client library behaves somewhat differently. If we do want to change it back, this would be a feature request. FYI - @mmicatka |
I gave the current sample a try. When no messages are pulled, it no longer returns Exception in thread "main" com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: You have not specified an ack ID in the request.
at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:47)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)
at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68)
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1133)
at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1277)
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1038)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:808)
at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:564)
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:534)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:562)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:743)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:722)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Suppressed: com.google.api.gax.rpc.AsyncTaskException: Asynchronous task failed
at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(ApiExceptions.java:57)
at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)
at pubsub.SubscribeSyncExample.subscribeSyncExample(SubscribeSyncExample.java:80)
at pubsub.SubscribeSyncExample.main(SubscribeSyncExample.java:43)
Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: You have not specified an ack ID in the request.
at io.grpc.Status.asRuntimeException(Status.java:535)
... 10 more |
doing a sync pull on a subscription, and if there is no message, it throws
DeadlineExceededException
. Usually, if a pull times out, it would just return null. Also, pull wait time interval is usually configuration, how can this be configured?The text was updated successfully, but these errors were encountered: