You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by wychoi <wy...@bistel.co.kr> on 2016/01/06 06:20:47 UTC

Leaks in the ContinuousQuery Notification

HI

We're to examine ignite1.5.
We are being developed using the ContinuousQuery.

I put the cache in two server nodes, the update notification leak occurred
It did not occur in ignite1.4 
In the ContinuousQuery set RemoteFilter did not use

Piece of code like this:

CacheEntryUpdatedListener<AffinityKey, CusTomerObject>
cacheEntryUpdatedListener = new CacheEntryUpdatedListener<AffinityKey,
CusTomerObject>() {	
	@Override
	public void onUpdated( Iterable<CacheEntryEvent&lt;? extends AffinityKey, ?
extends CusTomerObject>> events)
			throws CacheEntryListenerException {
......
	}
};


ContinuousQuery<AffinityKey, CusTomerObject> query = new
ContinuousQuery<>();
query.setLocal(true);
query.setTimeInterval(1000);

ScanQuery scanQuery = new ScanQuery<AffinityKey, CusTomerObject>(new
IgniteBiPredicate<AffinityKey, CusTomerObject>() {
	@Override
	public boolean apply(AffinityKey key, CusTomerObject val) {
		return val.getGrobalKey() > 0;
	}
});
scanQuery.setLocal(true);
scanQuery.setPageSize(1);

query.setInitialQuery(scanQuery);
query.setLocalListener(cacheEntryUpdatedListener);
....

QueryCursor<Cache.Entry&lt;AffinityKey, CusTomerObject>> cursor =
cache.query(query);

for (Cache.Entry<AffinityKey, CusTomerObject> entry : cursor) {
	....
}
						
What should I do to solve this problem ?




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Leaks-in-the-ContinuousQuery-Notification-tp2385.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Leaks in the ContinuousQuery Notification

Posted by Denis Magda <dm...@gridgain.com>.
Hi,

So was that a problem related to your application? If you fill that 
there is a bug on the platform side then please provide us with a 
complete test so we can investigate what's going on on our side.

--
Denis

On 1/7/2016 5:48 AM, wychoi wrote:
> hi vkulichenko
> Thanks to the quick reply
>
> This problem is resolved do modify the logic in the method(
> CacheEntryUpdateListener.onUpdated )
> It occurs due to a problem with the process for the EventType.REMOVE
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-Leaks-in-the-ContinuousQuery-Notification-tp2396p2401.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Leaks in the ContinuousQuery Notification

Posted by wychoi <wy...@bistel.co.kr>.
hi vkulichenko 
Thanks to the quick reply

This problem is resolved do modify the logic in the method(
CacheEntryUpdateListener.onUpdated )
It occurs due to a problem with the process for the EventType.REMOVE





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-Leaks-in-the-ContinuousQuery-Notification-tp2396p2401.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Leaks in the ContinuousQuery Notification

Posted by Valentin Kulichenko <va...@gmail.com>.
Hi wychoi,

What kind of leak do you have and how do you detect it?

Starting with 1.5, continuous queries support failover, so they maintain
the update queues on backup nodes to make sure listener is notified even if
primary node crashes. These queues are eventually cleaned up after updates
are received by client and are no longer needed, so this should not be the
issue.

-Val

On Tue, Jan 5, 2016 at 9:20 PM, wychoi <wy...@bistel.co.kr> wrote:

> HI
>
> We're to examine ignite1.5.
> We are being developed using the ContinuousQuery.
>
> I put the cache in two server nodes, the update notification leak occurred
> It did not occur in ignite1.4
> In the ContinuousQuery set RemoteFilter did not use
>
> Piece of code like this:
>
> CacheEntryUpdatedListener<AffinityKey, CusTomerObject>
> cacheEntryUpdatedListener = new CacheEntryUpdatedListener<AffinityKey,
> CusTomerObject>() {
>         @Override
>         public void onUpdated( Iterable<CacheEntryEvent&lt;? extends
> AffinityKey, ?
> extends CusTomerObject>> events)
>                         throws CacheEntryListenerException {
> ......
>         }
> };
>
>
> ContinuousQuery<AffinityKey, CusTomerObject> query = new
> ContinuousQuery<>();
> query.setLocal(true);
> query.setTimeInterval(1000);
>
> ScanQuery scanQuery = new ScanQuery<AffinityKey, CusTomerObject>(new
> IgniteBiPredicate<AffinityKey, CusTomerObject>() {
>         @Override
>         public boolean apply(AffinityKey key, CusTomerObject val) {
>                 return val.getGrobalKey() > 0;
>         }
> });
> scanQuery.setLocal(true);
> scanQuery.setPageSize(1);
>
> query.setInitialQuery(scanQuery);
> query.setLocalListener(cacheEntryUpdatedListener);
> ....
>
> QueryCursor<Cache.Entry&lt;AffinityKey, CusTomerObject>> cursor =
> cache.query(query);
>
> for (Cache.Entry<AffinityKey, CusTomerObject> entry : cursor) {
>         ....
> }
>
> What should I do to solve this problem ?
>
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Leaks-in-the-ContinuousQuery-Notification-tp2385.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>