You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Peter Schmitt <pe...@gmail.com> on 2017/03/02 23:59:21 UTC

hasOffHeapPointer

Hello Ignite-Community!

All our Ignite caches are offheap.
Now I've found the following entry in the logs:
"Value did not change, skip write swap entry..."

Checking the source-code I can see that it can just happen in
case hasOffHeapPointer returns true. What does that mean? We just have
"soft references" between caches. In our case cache-entries don't have
references to entries in other caches via a reference-variable pointing to
those entries. Instead we store the key (in most cases a string) of the
other cache-entry and do a lookup (once needed).

Any hint is appreciated,
Peter

Re: hasOffHeapPointer

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Peter,

There was misunderstanding from my side.

OffHeapPointer is address where entry located in memory. So, if you use
offheap cache, your entries will be resides in OffHeap and they can be
accessed from heap via OffHeapPointers. E.g. expire policies used this
pointers for track entries.

>I've observed it the past few days and it happens quite randomly.
I can't reproduce the issue locally. I would like to see a stacktrace to
understand the exact reason.

>Do you mean that the stored entry has the same hash-code and therefore it
doesn't get replaced?
Not quiet. It is possible entry was loaded from offheap by Ignite internals
for some needs.




On Thu, Mar 16, 2017 at 8:19 PM, Peter Schmitt <pe...@gmail.com>
wrote:

> Hi Andrey,
>
> thank you for your answer!
> I've observed it the past few days and it happens quite randomly.
> I can't really interpret the answer, because I haven't configured a
> AccessedEvictionPolicy.
> Do you mean that the stored entry has the same hash-code and therefore it
> doesn't get replaced?
>
> Kind regards,
> Peter
>
>
>
> 2017-03-08 14:08 GMT+01:00 Andrey Mashenkov <an...@gmail.com>:
>
>> Hi Peter,
>>
>> I think the message is not relevant.
>> It means, Entry had been load from Offhead earlier was evicted to Offheap
>> back (as AccessedEvictionPolicy is configured) without changes. So, there
>> is no need to rewrite Offheap data.
>> You shouldn't bother about this.
>>
>> On Sat, Mar 4, 2017 at 2:47 PM, Peter Schmitt <
>> peter.schmitt.jee@gmail.com> wrote:
>>
>>> Hi Andrey,
>>>
>>> see https://github.com/ps4os/ignite_offheap_test/blob/master
>>> /src/main/java/demo/RunIgniteTester.java#L83
>>>
>>> Kind regards,
>>> Peter
>>>
>>>
>>>
>>> 2017-03-03 13:35 GMT+01:00 Andrey Mashenkov <an...@gmail.com>
>>> :
>>>
>>>> Hi Peter,
>>>>
>>>> It looks like offheap entry was evicted from cache and it won't to be
>>>> swapped by some reason.
>>>> Would you please share cache configuration?
>>>>
>>>> On Fri, Mar 3, 2017 at 2:59 AM, Peter Schmitt <
>>>> peter.schmitt.jee@gmail.com> wrote:
>>>>
>>>>> Hello Ignite-Community!
>>>>>
>>>>> All our Ignite caches are offheap.
>>>>> Now I've found the following entry in the logs:
>>>>> "Value did not change, skip write swap entry..."
>>>>>
>>>>> Checking the source-code I can see that it can just happen in
>>>>> case hasOffHeapPointer returns true. What does that mean? We just have
>>>>> "soft references" between caches. In our case cache-entries don't have
>>>>> references to entries in other caches via a reference-variable pointing to
>>>>> those entries. Instead we store the key (in most cases a string) of the
>>>>> other cache-entry and do a lookup (once needed).
>>>>>
>>>>> Any hint is appreciated,
>>>>> Peter
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Andrey V. Mashenkov
>>>>
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Andrey V. Mashenkov
>>
>
>


-- 
Best regards,
Andrey V. Mashenkov

On Thu, Mar 16, 2017 at 8:19 PM, Peter Schmitt <pe...@gmail.com>
wrote:

> Hi Andrey,
>
> thank you for your answer!
> I've observed it the past few days and it happens quite randomly.
> I can't really interpret the answer, because I haven't configured a
> AccessedEvictionPolicy.
> Do you mean that the stored entry has the same hash-code and therefore it
> doesn't get replaced?
>
> Kind regards,
> Peter
>
>
>
> 2017-03-08 14:08 GMT+01:00 Andrey Mashenkov <an...@gmail.com>:
>
>> Hi Peter,
>>
>> I think the message is not relevant.
>> It means, Entry had been load from Offhead earlier was evicted to Offheap
>> back (as AccessedEvictionPolicy is configured) without changes. So, there
>> is no need to rewrite Offheap data.
>> You shouldn't bother about this.
>>
>> On Sat, Mar 4, 2017 at 2:47 PM, Peter Schmitt <
>> peter.schmitt.jee@gmail.com> wrote:
>>
>>> Hi Andrey,
>>>
>>> see https://github.com/ps4os/ignite_offheap_test/blob/master
>>> /src/main/java/demo/RunIgniteTester.java#L83
>>>
>>> Kind regards,
>>> Peter
>>>
>>>
>>>
>>> 2017-03-03 13:35 GMT+01:00 Andrey Mashenkov <an...@gmail.com>
>>> :
>>>
>>>> Hi Peter,
>>>>
>>>> It looks like offheap entry was evicted from cache and it won't to be
>>>> swapped by some reason.
>>>> Would you please share cache configuration?
>>>>
>>>> On Fri, Mar 3, 2017 at 2:59 AM, Peter Schmitt <
>>>> peter.schmitt.jee@gmail.com> wrote:
>>>>
>>>>> Hello Ignite-Community!
>>>>>
>>>>> All our Ignite caches are offheap.
>>>>> Now I've found the following entry in the logs:
>>>>> "Value did not change, skip write swap entry..."
>>>>>
>>>>> Checking the source-code I can see that it can just happen in
>>>>> case hasOffHeapPointer returns true. What does that mean? We just have
>>>>> "soft references" between caches. In our case cache-entries don't have
>>>>> references to entries in other caches via a reference-variable pointing to
>>>>> those entries. Instead we store the key (in most cases a string) of the
>>>>> other cache-entry and do a lookup (once needed).
>>>>>
>>>>> Any hint is appreciated,
>>>>> Peter
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Andrey V. Mashenkov
>>>>
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Andrey V. Mashenkov
>>
>
>


-- 
Best regards,
Andrey V. Mashenkov

Re: hasOffHeapPointer

Posted by Peter Schmitt <pe...@gmail.com>.
Hi Andrey,

thank you for your answer!
I've observed it the past few days and it happens quite randomly.
I can't really interpret the answer, because I haven't configured a
AccessedEvictionPolicy.
Do you mean that the stored entry has the same hash-code and therefore it
doesn't get replaced?

Kind regards,
Peter



2017-03-08 14:08 GMT+01:00 Andrey Mashenkov <an...@gmail.com>:

> Hi Peter,
>
> I think the message is not relevant.
> It means, Entry had been load from Offhead earlier was evicted to Offheap
> back (as AccessedEvictionPolicy is configured) without changes. So, there
> is no need to rewrite Offheap data.
> You shouldn't bother about this.
>
> On Sat, Mar 4, 2017 at 2:47 PM, Peter Schmitt <peter.schmitt.jee@gmail.com
> > wrote:
>
>> Hi Andrey,
>>
>> see https://github.com/ps4os/ignite_offheap_test/blob/master
>> /src/main/java/demo/RunIgniteTester.java#L83
>>
>> Kind regards,
>> Peter
>>
>>
>>
>> 2017-03-03 13:35 GMT+01:00 Andrey Mashenkov <an...@gmail.com>:
>>
>>> Hi Peter,
>>>
>>> It looks like offheap entry was evicted from cache and it won't to be
>>> swapped by some reason.
>>> Would you please share cache configuration?
>>>
>>> On Fri, Mar 3, 2017 at 2:59 AM, Peter Schmitt <
>>> peter.schmitt.jee@gmail.com> wrote:
>>>
>>>> Hello Ignite-Community!
>>>>
>>>> All our Ignite caches are offheap.
>>>> Now I've found the following entry in the logs:
>>>> "Value did not change, skip write swap entry..."
>>>>
>>>> Checking the source-code I can see that it can just happen in
>>>> case hasOffHeapPointer returns true. What does that mean? We just have
>>>> "soft references" between caches. In our case cache-entries don't have
>>>> references to entries in other caches via a reference-variable pointing to
>>>> those entries. Instead we store the key (in most cases a string) of the
>>>> other cache-entry and do a lookup (once needed).
>>>>
>>>> Any hint is appreciated,
>>>> Peter
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Andrey V. Mashenkov
>>>
>>
>>
>
>
> --
> Best regards,
> Andrey V. Mashenkov
>

Re: hasOffHeapPointer

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Peter,

I think the message is not relevant.
It means, Entry had been load from Offhead earlier was evicted to Offheap
back (as AccessedEvictionPolicy is configured) without changes. So, there
is no need to rewrite Offheap data.
You shouldn't bother about this.

On Sat, Mar 4, 2017 at 2:47 PM, Peter Schmitt <pe...@gmail.com>
wrote:

> Hi Andrey,
>
> see https://github.com/ps4os/ignite_offheap_test/blob/
> master/src/main/java/demo/RunIgniteTester.java#L83
>
> Kind regards,
> Peter
>
>
>
> 2017-03-03 13:35 GMT+01:00 Andrey Mashenkov <an...@gmail.com>:
>
>> Hi Peter,
>>
>> It looks like offheap entry was evicted from cache and it won't to be
>> swapped by some reason.
>> Would you please share cache configuration?
>>
>> On Fri, Mar 3, 2017 at 2:59 AM, Peter Schmitt <
>> peter.schmitt.jee@gmail.com> wrote:
>>
>>> Hello Ignite-Community!
>>>
>>> All our Ignite caches are offheap.
>>> Now I've found the following entry in the logs:
>>> "Value did not change, skip write swap entry..."
>>>
>>> Checking the source-code I can see that it can just happen in
>>> case hasOffHeapPointer returns true. What does that mean? We just have
>>> "soft references" between caches. In our case cache-entries don't have
>>> references to entries in other caches via a reference-variable pointing to
>>> those entries. Instead we store the key (in most cases a string) of the
>>> other cache-entry and do a lookup (once needed).
>>>
>>> Any hint is appreciated,
>>> Peter
>>>
>>
>>
>>
>> --
>> Best regards,
>> Andrey V. Mashenkov
>>
>
>


-- 
Best regards,
Andrey V. Mashenkov

Re: hasOffHeapPointer

Posted by Peter Schmitt <pe...@gmail.com>.
Hi Andrey,

see
https://github.com/ps4os/ignite_offheap_test/blob/master/src/main/java/demo/RunIgniteTester.java#L83

Kind regards,
Peter



2017-03-03 13:35 GMT+01:00 Andrey Mashenkov <an...@gmail.com>:

> Hi Peter,
>
> It looks like offheap entry was evicted from cache and it won't to be
> swapped by some reason.
> Would you please share cache configuration?
>
> On Fri, Mar 3, 2017 at 2:59 AM, Peter Schmitt <peter.schmitt.jee@gmail.com
> > wrote:
>
>> Hello Ignite-Community!
>>
>> All our Ignite caches are offheap.
>> Now I've found the following entry in the logs:
>> "Value did not change, skip write swap entry..."
>>
>> Checking the source-code I can see that it can just happen in
>> case hasOffHeapPointer returns true. What does that mean? We just have
>> "soft references" between caches. In our case cache-entries don't have
>> references to entries in other caches via a reference-variable pointing to
>> those entries. Instead we store the key (in most cases a string) of the
>> other cache-entry and do a lookup (once needed).
>>
>> Any hint is appreciated,
>> Peter
>>
>
>
>
> --
> Best regards,
> Andrey V. Mashenkov
>

Re: hasOffHeapPointer

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi Peter,

It looks like offheap entry was evicted from cache and it won't to be
swapped by some reason.
Would you please share cache configuration?

On Fri, Mar 3, 2017 at 2:59 AM, Peter Schmitt <pe...@gmail.com>
wrote:

> Hello Ignite-Community!
>
> All our Ignite caches are offheap.
> Now I've found the following entry in the logs:
> "Value did not change, skip write swap entry..."
>
> Checking the source-code I can see that it can just happen in
> case hasOffHeapPointer returns true. What does that mean? We just have
> "soft references" between caches. In our case cache-entries don't have
> references to entries in other caches via a reference-variable pointing to
> those entries. Instead we store the key (in most cases a string) of the
> other cache-entry and do a lookup (once needed).
>
> Any hint is appreciated,
> Peter
>



-- 
Best regards,
Andrey V. Mashenkov