ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] pavlukhin commented on a change in pull request #6490: IGNITE-7285 Add default query timeout
Date Tue, 18 Jun 2019 09:20:31 GMT
pavlukhin commented on a change in pull request #6490: IGNITE-7285 Add default query timeout
URL: https://github.com/apache/ignite/pull/6490#discussion_r294690119
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
 ##########
 @@ -390,9 +390,10 @@ public int pageSize() {
 
     /** {@inheritDoc} */
     @Override public CacheQuery<T> timeout(long timeout) {
-        A.ensure(timeout >= 0, "timeout >= 0");
-
-        this.timeout = timeout;
+        if (timeout >= 0)
+            this.timeout = timeout;
+        else
+            this.timeout = cctx.gridConfig().getDefaultQueryTimeout();
 
 Review comment:
   From the first glance changed behavior of this method looks counter intuitive: if a passed
argument is lesser than 0 a default timeout from a configuration is used. For me a check employed
before asserting that negative values are invalid.
   
   And does this change really makes queries use a default timeout? I suppose a small test
will answer this question.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message