As an example: Client calls MyService with a deadline of 10 seconds. MyService calls OtherService as part of responding. However, the call to OtherService times out due to the deadline in 10 seconds. MyService tries to log the error to Spanner; but it's still using that context deadline which expired.
Is there a way to get a new context with an extended deadline? Are there any issues with that approach? On Tuesday, August 14, 2018 at 1:25:47 PM UTC-7, r...@google.com wrote: > > I'm working on a service that write some log info to spanner when it's > done responding to a request. > However, the service uses the context's deadline to write to spanner, so > if the deadline expires due to some long running RPC, the write to spanner > fails (because the deadline expired), and we don't get any log info. > > What's the best practice for dealing with this situation? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.