Re: Query timeout

2020-05-04 Thread Ilya Kasnacheev
Hello!

Turns out, "?queryTimeout=" will only be available in 2.9:
https://issues.apache.org/jira/browse/IGNITE-12462

However, you can already use (Statement)ps.setQueryTimeout(1), it works in
your case as well (checked on 2.8).

Regards,
-- 
Ilya Kasnacheev


вт, 24 мар. 2020 г. в 11:05, breathem :

> Hi, Taras.
> We try to connect to server via NetBeans 8.2 for development purposes.
> In Services tab we add Ignite 2.8.0 JDBC driver (ignite-core-2.8.0.jar) and
> choose org.apache.ignite.IgniteJdbcThinDriver.
>
> To reproduce long running query we create 2 tables:
> create table if not exists TEST
> (kField long not null, vField varchar(100) not null, rField varchar(100)
> not
> null, primary key (kField))
> WITH "template=REPLICATED, cache_name=TEST, key_type=KTEST,
> value_type=VTEST"
>
> create table if not exists TEST1
> (kField long not null, vField varchar(100) not null, rField varchar(100)
> not
> null, primary key (kField))
> WITH "template=REPLICATED, cache_name=TEST1, key_type=KTEST1,
> value_type=VTEST1"
>
> Then fill this tables with 1 000 000 random data rows, eg
> int size = 1_000_000;
>
> IgniteCallable clb = new IgniteCallable()
> {
>   @IgniteInstanceResource
>   Ignite ignite;
>
>   @Override
>   public Integer call() throws Exception
>   {
> IgniteCache test =
> ignite.cache("TEST").withKeepBinary();
>
> if (test.size(CachePeekMode.ALL) > 0)
> {
>   test.clear();
> }
>
> IgniteBinary bin = ignite.binary();
> long t;
>
> for (int i = 0; i < size; i++)
> {
>   BinaryObjectBuilder k = bin.builder("KTEST");
>   BinaryObjectBuilder v = bin.builder("VTEST");
>
>   t = System.currentTimeMillis();
>
>   k.setField("kField", t);
>   v.setField("vField", "I am value string " + t);
>   v.setField("rField", randomString(100));
>
>   test.putAsync(k.build(), v.build());
> }
>
> return null;
>   }
> };
>
> Then connect to server via NetBeans with
> jdbc:ignite:thin://192.168.1.138:10800?queryTimeout=1
>
> Then make long running query:
> select t.kField, t.vField, t1.vField from test t inner join test1 t1 on
> t.vField = t1.vField;
>
> This query in our case is executed ~73 sec and not cancelled.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: CPP: Query timeout

2020-04-08 Thread Ilya Kasnacheev
Hello!

Unfortunately, this is not trivial, you should search your nodes' logs for
locNodeId=022a7f53 or localNodeId=022a7f53

Regards,
-- 
Ilya Kasnacheev


ср, 8 апр. 2020 г. в 11:51, nidhinms :

> Hi
>
> Do ignite provide a method to find ip address from this ID.
> 022a7f53-8628-409a-851a-e8ef62d050f7.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: CPP: Query timeout

2020-04-08 Thread nidhinms
Hi 

Do ignite provide a method to find ip address from this ID.
022a7f53-8628-409a-851a-e8ef62d050f7.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: CPP: Query timeout

2020-04-08 Thread Ilya Kasnacheev
Hello!

I can see the following messages repeating:
[10:17:09,530][WARNING][grid-timeout-worker-#23][diagnostic] Found long
running cache future [startTime=10:15:10.302, curTime=10:17:09.523,
fut=GridNearAtomicSingleUpdateFuture [reqState=Primary
[id=936138d2-e6e5-44f8-b731-7576c83e9334, opRes=false, expCnt=1, rcvdCnt=0,
primaryRes=false, done=false, waitFor=[
*022a7f53-8628-409a-851a-e8ef62d050f7*], rcvd=null],
super=GridNearAtomicAbstractUpdateFuture [remapCnt=100,
topVer=AffinityTopologyVersion [topVer=2697, minorTopVer=0],
remapTopVer=null, err=null, futId=1, super=GridFutureAdapter
[ignoreInterrupts=false, state=INIT, res=null, hash=1168304564
[10:17:09,530][WARNING][grid-timeout-worker-#23][diagnostic] Found long
running cache future [startTime=10:15:13.911, curTime=10:17:09.523,
fut=GridNearAtomicSingleUpdateFuture [reqState=Primary
[id=936138d2-e6e5-44f8-b731-7576c83e9334, opRes=false, expCnt=1, rcvdCnt=0,
primaryRes=false, done=false, waitFor=[
*022a7f53-8628-409a-851a-e8ef62d050f7*], rcvd=null],
super=GridNearAtomicAbstractUpdateFuture [remapCnt=100,
topVer=AffinityTopologyVersion [topVer=2698, minorTopVer=0],
remapTopVer=null, err=null, futId=16385, super=GridFutureAdapter
[ignoreInterrupts=false, state=INIT, res=null, hash=1764819750

Do you happen to have logs for *022a7f53-8628-409a-851a-e8ef62d050f7* node?
Ideally, thread dumps also.

Regards,
-- 
Ilya Kasnacheev


ср, 8 апр. 2020 г. в 10:58, nidhinms :

> Issue happened because one of ignite server nodes was down. Queries were
> successful after servers restarted. Attaching logs from client.
>
> ignite-1835519d.log
> <
> http://apache-ignite-users.70518.x6.nabble.com/file/t2730/ignite-1835519d.log>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: CPP: Query timeout

2020-04-08 Thread nidhinms
Issue happened because one of ignite server nodes was down. Queries were
successful after servers restarted. Attaching logs from client.

ignite-1835519d.log
 
 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: CPP: Query timeout

2020-04-07 Thread Ilya Kasnacheev
Hello!

Can you please provide logs and thread dumps (collectible with jstack
) of all your Apache Ignite nodes?

Hard to pinpoint it otherwise.

Thanks,
-- 
Ilya Kasnacheev


пн, 6 апр. 2020 г. в 13:22, nidhinms :

> I tried to execute an INSERT query to my ignite cluster. It was working
> fine.
> After they update the ignite server instance with some new jars the query
> is
> not returning. Can some one guide me to rectify this issue.
>
> 1. Does peerLoadingEnabled=true has omething to do with this issue. Or does
> peerClassLoading work with CPP and Java ignite mixed setup.
> 2. Can I set timeout in my query with CPP.
> 3. Where I can find info about why a query is getting stalled.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


CPP: Query timeout

2020-04-06 Thread nidhinms
I tried to execute an INSERT query to my ignite cluster. It was working fine.
After they update the ignite server instance with some new jars the query is
not returning. Can some one guide me to rectify this issue.

1. Does peerLoadingEnabled=true has omething to do with this issue. Or does
peerClassLoading work with CPP and Java ignite mixed setup.
2. Can I set timeout in my query with CPP.
3. Where I can find info about why a query is getting stalled.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Query timeout

2020-03-24 Thread breathem
Hi, Taras.
We try to connect to server via NetBeans 8.2 for development purposes.
In Services tab we add Ignite 2.8.0 JDBC driver (ignite-core-2.8.0.jar) and
choose org.apache.ignite.IgniteJdbcThinDriver.

To reproduce long running query we create 2 tables:
create table if not exists TEST
(kField long not null, vField varchar(100) not null, rField varchar(100) not
null, primary key (kField))
WITH "template=REPLICATED, cache_name=TEST, key_type=KTEST,
value_type=VTEST"

create table if not exists TEST1
(kField long not null, vField varchar(100) not null, rField varchar(100) not
null, primary key (kField))
WITH "template=REPLICATED, cache_name=TEST1, key_type=KTEST1,
value_type=VTEST1"

Then fill this tables with 1 000 000 random data rows, eg
int size = 1_000_000;

IgniteCallable clb = new IgniteCallable()
{
  @IgniteInstanceResource
  Ignite ignite;
  
  @Override
  public Integer call() throws Exception
  {
IgniteCache test =
ignite.cache("TEST").withKeepBinary();

if (test.size(CachePeekMode.ALL) > 0)
{
  test.clear();
}

IgniteBinary bin = ignite.binary();
long t;

for (int i = 0; i < size; i++)
{
  BinaryObjectBuilder k = bin.builder("KTEST");
  BinaryObjectBuilder v = bin.builder("VTEST");
  
  t = System.currentTimeMillis();
  
  k.setField("kField", t);
  v.setField("vField", "I am value string " + t);
  v.setField("rField", randomString(100));
  
  test.putAsync(k.build(), v.build());
}

return null;
  }
};

Then connect to server via NetBeans with
jdbc:ignite:thin://192.168.1.138:10800?queryTimeout=1

Then make long running query:
select t.kField, t.vField, t1.vField from test t inner join test1 t1 on
t.vField = t1.vField;

This query in our case is executed ~73 sec and not cancelled.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Query timeout

2020-03-23 Thread Taras Ledkov

Hi,

Hm.. It works for me.
Looks at the Ignite test: 
JdbcThinStatementTimeoutSelfTest#testQueryTimeoutRetrival [1].


Please share your simple reproducer or test.

[1]. 
https://github.com/apache/ignite/blob/9f19e0160b1ca43a27908849ad46c65ebd8689f1/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinStatementTimeoutSelfTest.java#L212


On 23.03.2020 14:36, breathem wrote:

I try jdbc:ignite:thin://192.168.1.138:10800;queryTimeout=1 and
jdbc:ignite:thin://192.168.1.138:10800?queryTimeout=1 both.
Query is still executed more then 1 sec without exception.
Is this parameter supported in 2.8.0?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


--
Taras Ledkov
Mail-To: tled...@gridgain.com



Re: Query timeout

2020-03-23 Thread breathem
I try jdbc:ignite:thin://192.168.1.138:10800;queryTimeout=1 and
jdbc:ignite:thin://192.168.1.138:10800?queryTimeout=1 both.
Query is still executed more then 1 sec without exception. 
Is this parameter supported in 2.8.0?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Query timeout

2020-03-23 Thread Taras Ledkov

Hi,

queryTimeout=N

in seconds according with JDBC specification: 
java.sql.Statement#setQueryTimeout


On 23.03.2020 12:47, breathem wrote:

Hi all,
Is there any way to set query timeout parameter in JDBC url?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


--
Taras Ledkov
Mail-To: tled...@gridgain.com



Query timeout

2020-03-23 Thread breathem
Hi all,
Is there any way to set query timeout parameter in JDBC url?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: How to set query timeout or cancel query when submit SQL query from SQL tool like DBweaver and sqlline?

2018-09-16 Thread Павлухин Иван
Hi Ray,

As far as I know query timeout can be configured only for
SqlQuery/SqlFieldsQuery API. Mentioned global timeout configuration through
"jdbc:h2..." URL was not implemented.


How to set query timeout or cancel query when submit SQL query from SQL tool like DBweaver and sqlline?

2018-09-13 Thread Ray
When I go through this document
https://apacheignite-sql.readme.io/docs/query-cancellation, it seems query
can set timeout if the query submitted through java API(SqlQuery,
SqlFieldsQuery).
So my question is how to set query timeout or cancel query when submit SQL
query from SQL tool like DBweaver?

One more question if query submitted through SQL tool can't be cancelled,
how to set global query timeout parameter?
https://issues.apache.org/jira/browse/IGNITE-2680
In the comments of this ticket, Alexie mentioned the global timeout
parameter is jdbc:h2:~/db/test;query_timeout=1.
But I don't see a way of setting it.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: setting query timeout and getting partial result instead of exception.

2017-04-26 Thread Andrey Mashenkov
Hi,

You can try to increase SqlQuery.setTimeout() (30 sec by default) or
connectorConfiguration.setIdleTimeout() (7 sec by default)
It may slightly help if you use sorting, as you need to have pages of rows
from all nodes to make correct merge.

Also, you can try to increase SqlQuery.pageSize() or
JDBCStatement.fetchSize(). 1024 is default value.

On Wed, Apr 26, 2017 at 3:24 PM, neerajbhatt <neerajbhatt2...@gmail.com>
wrote:

> Hi All
>
> We have a cache which is to be partitioned across nodes.
> Currently all the SQL queries are executed on all nodes by default.
> However, if a node is slow, all the queries will be slow.
> So, is there a way to set the timeout on the SQL queries, so that even
> though a few nodes are slow and timeout, the data is returned from rest of
> the nodes.
> This way, we will get partial data, instead of exception.
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/setting-query-timeout-and-getting-
> partial-result-instead-of-exception-tp12266.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov


setting query timeout and getting partial result instead of exception.

2017-04-26 Thread neerajbhatt
Hi All

We have a cache which is to be partitioned across nodes. 
Currently all the SQL queries are executed on all nodes by default.
However, if a node is slow, all the queries will be slow.
So, is there a way to set the timeout on the SQL queries, so that even
though a few nodes are slow and timeout, the data is returned from rest of
the nodes. 
This way, we will get partial data, instead of exception.




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/setting-query-timeout-and-getting-partial-result-instead-of-exception-tp12266.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.