You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by gunman524 <gu...@126.com> on 2017/11/16 02:43:20 UTC

Initial query resent the data when client got reconnect

I tried to use contentious query to monitor a cache and set initial query,
LocalListener and RemoteFilter as example did.

The issue I met is when client reconnect to Ignite cluster, the initial
query will query the data from cache which the client might already got
before.

I tried to use unchanged ID or instance name

/cfg.setConsistentId("de01");
cfg.setIgniteInstanceName("test1");  /

but does not work.

*Is any way to solve this issue?*

Many thanks,



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

Re: Initial query resent the data when client got reconnect

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hello,

When node disconnected from cluster, server's nodes close query listener
and lose information about updates which were already sent to client. You
should query again for avoiding this situation. Server nodes don't keep the
information when node goes out from clustre because it can lead to high
memory consumption.

On Fri, Nov 17, 2017 at 3:11 AM, gunman524 <gu...@126.com> wrote:

> Alexey, thanks for reply.
>
> I wondered does Ignite will set a incremental value for incoming data so
> can
> help people to do stuff like you said?
>
> You know for isolate data pushers are not easy to generate a unique
> incremental value. I know many distribute data store,like
> elastisearch,mango
> has those  build-in field.
>
> So, how about Ignite, does we already has one but just I don;t know?
>
> Thanks,
>
> Gin
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Initial query resent the data when client got reconnect

Posted by gunman524 <gu...@126.com>.
Voted. Appreciated and looking for it.



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

Re: Initial query resent the data when client got reconnect

Posted by Michael Cherkasov <mi...@gmail.com>.
There's a ticket for this feature:
https://issues.apache.org/jira/browse/IGNITE-5625
please vote for it and at some point, it will be implemented.

2017-11-21 13:52 GMT+03:00 gunman524 <gu...@126.com>:

> Mike, double checked Mongodb way, their ObjectID only provide a unique ID,
> sorry for my info.   But there is open source project provide the auto
> increment feature for mongodb.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Initial query resent the data when client got reconnect

Posted by gunman524 <gu...@126.com>.
Mike, double checked Mongodb way, their ObjectID only provide a unique ID,
sorry for my info.   But there is open source project provide the auto
increment feature for mongodb.  



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

Re: Initial query resent the data when client got reconnect

Posted by Mikhail <mi...@gmail.com>.
Hi,

Could you please show examples how this is implemented in system mentioned
by you: elastisearch,mango?
I'll create an enhancement request for this feature.

Thanks,
Mike.



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

Re: Initial query resent the data when client got reconnect

Posted by gunman524 <gu...@126.com>.
Thanks, Alexey. I think it's a valuable feature and ask for an enhancement. I
knew  AtomicSequence but in my case I might prefer to JDBC thin client for
data injecting, so might not able to use AtomicSequence 



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

Re: Initial query resent the data when client got reconnect

Posted by Alexey Kukushkin <ku...@gmail.com>.
Hi,

Ignite presently does not support auto-incremental keys. You can start
discussing this feature on the Ignite Dev list and open an enhancement
request if the Community agrees it worths implementation.

Right you can use Ignite's AtomicSequence
<https://apacheignite.readme.io/docs/id-generator> (or AtomicLong if you
need it to be sequential) to get cluster-wide sequential IDs. You still
have to save the last ID somewhere.

Re: Initial query resent the data when client got reconnect

Posted by gunman524 <gu...@126.com>.
Alexey, thanks for reply.

I wondered does Ignite will set a incremental value for incoming data so can
help people to do stuff like you said?

You know for isolate data pushers are not easy to generate a unique
incremental value. I know many distribute data store,like elastisearch,mango
has those  build-in field.

So, how about Ignite, does we already has one but just I don;t know? 

Thanks,

Gin



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

Re: Initial query resent the data when client got reconnect

Posted by Alexey Kukushkin <ku...@gmail.com>.
Hi,

Initial query just gets the data according to the query. It will always
bring all data if you query all data. You need to manually control what
data you want your initial query to get. For example, if your key is
incremental (like numeric ID or timestamp) then you could save the last
extracted ID in some auxiliary cache and have your initial query filter
data like "where ID > {last id}". You client would get the {last id} upon
startup from the auxiliary cache and update it once the data is processed.