cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2848) Make the Client API support passing down timeouts
Date Thu, 02 Mar 2017 09:09:46 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-2848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891867#comment-15891867
] 

Sylvain Lebresne commented on CASSANDRA-2848:
---------------------------------------------

I'm afraid I'm not, sorry.

I did skimmed at the patch quickly and one general remark I can make is that I think we should
handle that timeout at the message level ({{MessageOut}} and {{MessageIn}}) rather than at
the payload level ({{ReadCommand}} in that case, I don't think we should add anything to {{ReadCommand}}
in this patch in general). In particular, due to that, it doesn't seem the request timeout
is taken into account when 1) timeout messages ("dropping them") and 2) setting the callbacks
timeout in the {{MessagingService}} expiring map in the current patch. So that while passing
a timeout lower than the configured one should kind of work (that is from a client point of
view, we'll answer with the timeout passed, though we'd hold stuff in memory for longer),
passing a higher timeout than the default/global one wouldn't (that is, after the global timeout
has elapsed, we'll drop the callback and messages so that we won't truly give more time to
the query, we'd simply make the client wait longer for something that cannot ever return).

So I don't think the patch works as is for the reason above, and more generally I think we
really need proper dtests for this (we'd really want a least a test that shows that if you
request a higher timeout that the default one *and* a replica take longer than the default
timeout but lower than the requested one, then the query does return properly), but I'm going
to remove myself from review otherwise as I'm afraid I don't have time to dig more deeply
in the patch at the current time. Sorry again.


> Make the Client API support passing down timeouts
> -------------------------------------------------
>
>                 Key: CASSANDRA-2848
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2848
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Chris Goffinet
>            Assignee: Geoffrey Yu
>            Priority: Minor
>             Fix For: 3.11.x
>
>         Attachments: 2848-trunk.txt, 2848-trunk-v2.txt
>
>
> Having a max server RPC timeout is good for worst case, but many applications that have
middleware in front of Cassandra, might have higher timeout requirements. In a fail fast environment,
if my application starting at say the front-end, only has 20ms to process a request, and it
must connect to X services down the stack, by the time it hits Cassandra, we might only have
10ms. I propose we provide the ability to specify the timeout on each call we do optionally.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message