Thanks for the response. >>We've found (the hard way) that 'ok' can be false for instance when finishing a request whose client has already timed out. Okay, So I need to put the logic in to detect if my server is shutting down.
>>Other that we've observed ok to be false as described above, whereas we've never observed the result of Next() to be false unless the server was actually shutting down Looking at 1.4.2 doc, indeed, the documentation is incorrect. /// Read from the queue, blocking until an event is available or the queue is /// shutting down. /// /// \param tag[out] Updated to point to the read event's tag. /// \param ok[out] true if read a regular event, false otherwise. /// /// \return true if read a regular event, false if the queue is shutting down. bool Next(void** tag, bool* ok) The following line /// \return true if read a regular event, false if the queue is shutting down should instead be /// \return true if read an event, false if the queue is shutting down An event can be a regular event or an irregular event (for the lack of a better term). An example would be that for a client streaming rpc, a legit incoming request is a regular event whereas a client stream close is irregular. The terminology is odd but it is what it is. Thanks. On Friday, August 18, 2017 at 2:42:28 PM UTC-7, Christian Rivasseau wrote: > > We've found (the hard way) that 'ok' can be false for instance when > finishing a request whose client has already timed out. > Not sure if that's a bug or a feature. > > @grpc team. > In any case it would be great to have formal specifications/doc for the > 'ok' tag. It's also unclear to me > what's the difference between the 'ok' tag and the return value of Next(). > > (Other that we've observed ok to be false as described above, whereas > we've never observed the result of Next() to be false > unless the server was actually shutting down). > > Best, > > On Fri, Aug 18, 2017 at 11:17 PM, Arpit Baldeva <[email protected] > <javascript:>> wrote: > >> Hi, >> >> In async model, from my experiments, when server shuts down, 'ok' will be >> false. Is there any other scenario in which it can be false? >> >> When the server is shutting down, I don't want to queue up another rpc >> request. But if the 'ok' boolean can be false in some other scenario(is >> there a concrete example?), I'd want to queue up another request. >> >> Thanks. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "grpc.io" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/grpc-io. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/grpc-io/5c567ffd-cddb-4443-a997-6416cee8c596%40googlegroups.com >> >> <https://groups.google.com/d/msgid/grpc-io/5c567ffd-cddb-4443-a997-6416cee8c596%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Christian Rivasseau > Co-founder and CTO @ Lefty <http://www.lefty.io> > +33 6 67 35 26 74 > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/e9191eff-9c68-401a-bf0c-457ddcb807b7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
