Discussion:
[capnproto] Expected error on pipelined request when first message wasn't sent?
a***@empirical.com
2018-01-30 17:08:33 UTC
Permalink
Hi all,

As of about a year ago capnp won't send a message if it thinks it would get
rejected for size issues on the remote end. Our service is structured such
that we send a very large request to open a remote object, then make a
series of small queries against that. We naturally let those queries be
pipelined, so don't call `.wait()` immediately on the initial query.

If the initial upload fails, it seems to happen pretty much silently. So
where if we call `.wait()` immediately on the upload, we get the expected
"Trying to send Cap'n proto message larger than single-message size limit."
If we pipeline a second request, we instead get the cryptic
"PromisedAnswer.questionId is not a current question." Is there a way to
return a more interpretable error, possibly mentioning that somewhere along
your pipelined requests a message wasn't sent?

Thanks!
-Alex
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
'Kenton Varda' via Cap'n Proto
2018-01-30 17:54:27 UTC
Permalink
Hi Alex,

This sounds like a bug. The pipelined request should fail with the same
error as the original request threw, not some cryptic thing about
questionIds. Can you file an issue? If you have some sample code that could
help too.

-Kenton
Post by a***@empirical.com
Hi all,
As of about a year ago capnp won't send a message if it thinks it would
get rejected for size issues on the remote end. Our service is structured
such that we send a very large request to open a remote object, then make a
series of small queries against that. We naturally let those queries be
pipelined, so don't call `.wait()` immediately on the initial query.
If the initial upload fails, it seems to happen pretty much silently. So
where if we call `.wait()` immediately on the upload, we get the expected
"Trying to send Cap'n proto message larger than single-message size limit."
If we pipeline a second request, we instead get the cryptic
"PromisedAnswer.questionId is not a current question." Is there a way to
return a more interpretable error, possibly mentioning that somewhere along
your pipelined requests a message wasn't sent?
Thanks!
-Alex
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/capnproto.
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
a***@empirical.com
2018-01-30 19:44:09 UTC
Permalink
Done: https://github.com/capnproto/capnproto/issues/623

Code
at https://github.com/capnproto/capnproto/compare/master...asilversempirical:bad_pipeline_error?expand=1.
I can make that a PR if it makes it easier to toy with.
Post by 'Kenton Varda' via Cap'n Proto
Hi Alex,
This sounds like a bug. The pipelined request should fail with the same
error as the original request threw, not some cryptic thing about
questionIds. Can you file an issue? If you have some sample code that could
help too.
-Kenton
Post by a***@empirical.com
Hi all,
As of about a year ago capnp won't send a message if it thinks it would
get rejected for size issues on the remote end. Our service is structured
such that we send a very large request to open a remote object, then make a
series of small queries against that. We naturally let those queries be
pipelined, so don't call `.wait()` immediately on the initial query.
If the initial upload fails, it seems to happen pretty much silently. So
where if we call `.wait()` immediately on the upload, we get the expected
"Trying to send Cap'n proto message larger than single-message size limit."
If we pipeline a second request, we instead get the cryptic
"PromisedAnswer.questionId is not a current question." Is there a way to
return a more interpretable error, possibly mentioning that somewhere along
your pipelined requests a message wasn't sent?
Thanks!
-Alex
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/capnproto.
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
Loading...