You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Pavlukhin (Jira)" <ji...@apache.org> on 2019/09/09 12:43:00 UTC

[jira] [Comment Edited] (IGNITE-7285) Add default query timeout

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

Ivan Pavlukhin edited comment on IGNITE-7285 at 9/9/19 12:42 PM:
-----------------------------------------------------------------

[~samaitra], sorry for a late response. I left a couple of comments on GitHub.
Regarding _unset_ timeout. I think that it would be more straightforward to have a following logic:
* Unset timeout means that a default one should be used.
* Explicitly set timeout must be used.
* Timeout values have the same meaning for {{SqlFieldsQuery.setTimeout}} and {{IgniteConfiguration.setDefaultQueryTimeout}}. Consequently 0 means infinite timeout for both methods.

Technically it can be done in a following way:
# {{SqlFieldsQuery}} declares {{private int timeout = -1}}.
# {{SqlFieldsQuery.setTimeout}} forbids negative arguments.
# Upon {{QueryParameters}} initialization we treat -1 as _unset_ value and use a default one.
A care should be taken when we create {{SqlFieldsQuery}} internally for an execution, like in {{OdbcRequestHandler}}.


was (Author: pavlukhin):
[~samaitra], I left a couple of comments on GitHub.
Regarding _unset_ timeout. I think that it would be more straightforward to have a following logic:
* Unset timeout means that a default one should be used.
* Explicitly set timeout must be used.
* Timeout values have the same meaning for {{SqlFieldsQuery.setTimeout}} and {{IgniteConfiguration.setDefaultQueryTimeout}}. Consequently 0 means infinite timeout for both methods.

Technically it can be done in a following way:
# {{SqlFieldsQuery}} declares {{private int timeout = -1}}.
# {{SqlFieldsQuery.setTimeout}} forbids negative arguments.
# Upon {{QueryParameters}} initialization we treat -1 as _unset_ value and use a default one.
A care should be taken when we create {{SqlFieldsQuery}} internally for an execution, like in {{OdbcRequestHandler}}.

> Add default query timeout
> -------------------------
>
>                 Key: IGNITE-7285
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7285
>             Project: Ignite
>          Issue Type: Improvement
>          Components: cache, sql
>    Affects Versions: 2.3
>            Reporter: Valentin Kulichenko
>            Assignee: Saikat Maitra
>            Priority: Major
>              Labels: sql-stability
>             Fix For: 2.8
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Currently it's possible to provide timeout only on query level. It would be very useful to have default timeout value provided on cache startup. Let's add {{CacheConfiguration#defaultQueryTimeout}} configuration property.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)