You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rakshita04 <ra...@siemens.com> on 2021/05/20 06:39:39 UTC

Running sql query on partitioned cache

Hi Team,

We are running sql query on our cache(which is configured in "Partitioned"
mode with backup =1)
We have two nodes connected over network to each other.
Our application is C++ based and running on ARM environment(linux)
We are facing 2 issues now-
1. when we are running below query on our code while in background we are
adding entries in DB-
const SqlFieldsQuery countQuery(
                "select count(reqType) "
                "from DBStorage "
                "where reqType=0"); DataBaseConfig.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/t2857/DataBaseConfig.xml>  
The count is returned is increasing with proper entry till 10,000 entries
but after that it is getting reset again and starting again with 0.
Is there anything else, we need to do for running sql query in partitioned
mode for correct results?

2. What C++ API we need to use to get exact size of cache on partitioned
mode? So cache.localSize() is returning half the size of actual size (may be
due to partitioned mode)?

I am attaching the xml for your reference.

regards,
Rakshita Chaudhary



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

Re: Running sql query on partitioned cache

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

1. You can try to reproduce the same issue in Java.
2. You should almost exclusively use cache.Size().

Regards,
-- 
Ilya Kasnacheev


пт, 21 мая 2021 г. в 12:02, rakshita04 <ra...@siemens.com>:

> Hi Ilya,
>
> 1. We cant share the running exe as its for ARM plus it requires some
> specific kernel image to run.
> If i put it in simple words if i use partitioned mode and backup=1 and want
> to run sql query on the existing cache, do we need to do something w.r.t
> colocation(as keys are distributed across both the nodes)?
>
> 2. yes i want to understand when to use cache.LocalSize() and when to use
> cache.Size()?
>
> regards,
> rakshita Chaudhary
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Running sql query on partitioned cache

Posted by rakshita04 <ra...@siemens.com>.
Hi Ilya,

1. We cant share the running exe as its for ARM plus it requires some
specific kernel image to run.
If i put it in simple words if i use partitioned mode and backup=1 and want
to run sql query on the existing cache, do we need to do something w.r.t
colocation(as keys are distributed across both the nodes)?

2. yes i want to understand when to use cache.LocalSize() and when to use
cache.Size()?

regards,
rakshita Chaudhary




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

Re: Running sql query on partitioned cache

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

1. Hard to say what happens here. Do you have a runnable reproducer for
this behavior? Can you share?

2.
https://ignite.apache.org/releases/latest/cppdoc/classignite_1_1cache_1_1Cache.html#a03574797da901a76180aad88476ef8ce
- Cache.Size()?

Regards,
-- 
Ilya Kasnacheev


чт, 20 мая 2021 г. в 09:39, rakshita04 <ra...@siemens.com>:

> Hi Team,
>
> We are running sql query on our cache(which is configured in "Partitioned"
> mode with backup =1)
> We have two nodes connected over network to each other.
> Our application is C++ based and running on ARM environment(linux)
> We are facing 2 issues now-
> 1. when we are running below query on our code while in background we are
> adding entries in DB-
> const SqlFieldsQuery countQuery(
>                 "select count(reqType) "
>                 "from DBStorage "
>                 "where reqType=0"); DataBaseConfig.xml
> <
> http://apache-ignite-users.70518.x6.nabble.com/file/t2857/DataBaseConfig.xml>
>
> The count is returned is increasing with proper entry till 10,000 entries
> but after that it is getting reset again and starting again with 0.
> Is there anything else, we need to do for running sql query in partitioned
> mode for correct results?
>
> 2. What C++ API we need to use to get exact size of cache on partitioned
> mode? So cache.localSize() is returning half the size of actual size (may
> be
> due to partitioned mode)?
>
> I am attaching the xml for your reference.
>
> regards,
> Rakshita Chaudhary
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>