Just wanted to clarify about the particular tag I am concerned about
(request rpc tag) - the subject of my thread. From the hello world example,
following one

service_->RequestSayHello(&ctx_, &request_, &responder_, cq_, cq_, this);

I do understand that in other scenarios, it is possible for to have a false
value for the 'ok' bool. For example, when client finishes streaming
request, the read rpc tag's 'ok' bool will be false (and other scenarios
for other tags when client timed out or cancelled).

On Fri, Aug 18, 2017 at 3:09 PM, Arpit Baldeva <[email protected]> wrote:

> 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]>
>> 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].
>>> 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/ms
>>> gid/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 <+33%206%2067%2035%2026%2074>
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "grpc.io" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/grpc-io/ywATt88Ef_I/unsubscribe.
> To unsubscribe from this group and all its topics, 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
> <https://groups.google.com/d/msgid/grpc-io/e9191eff-9c68-401a-bf0c-457ddcb807b7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAL2p%3D0kf9hSomQc3C2Vv60fE5w__tOOvvEMUsjsvPvhd%2BcS9_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to