You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grp...@googlegroups.com, Jun Li
Hi,
I am trying to use withDeadlineAfter() on a futureStub, but noticed that an error DEADLINE_EXCEEDED" is always thrown when a rpc is made on the futureStub for a second time.
Just wondering why this is the case? Maybe there is some restrictions to use deadlines with FutureStubs?
Any help is appreciated!
Best, Baojun
spenc...@google.com
unread,
Mar 19, 2018, 11:58:17 AM3/19/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
I think it's because calling `withDeadlineAfter` applies the timestamp of the deadline to a new stub and returns that new stub to you. If the deadline value is small, the deadline may expire before you have a chance to finish your second RPC. This is true for all stubs. Creating new stubs are cheap, so you can create a new stub with a deadline when you are making each RPC.
b...@soliduslink.com
unread,
Mar 20, 2018, 6:32:03 PM3/20/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
Thanks! Does deadline actually mean the lifespan of a stub? If so I got it all wrong. I thought it's just the waiting time for each call invoked from that stub.
Is it recommended practice to create a new stub for each grpc call? Are there any docs stating that?