[ 
https://issues.apache.org/jira/browse/IGNITE-20327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17765480#comment-17765480
 ] 

Ignite TC Bot commented on IGNITE-20327:
----------------------------------------

{panel:title=Branch: [pull/10929/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10929/head] Base: [master] : New Tests 
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Thin Client: Java{color} [[tests 
1|https://ci2.ignite.apache.org/viewLog.html?buildId=7337191]]
* {color:#013220}ClientTestSuite: CacheEntryListenersTest.testEventReceivedData 
- PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=7337204&buildTypeId=IgniteTests24Java8_RunAll]

> [Thin clients] Continuous Query EXPIRY/REMOVE events can consumes a huge 
> amount of heap 
> ----------------------------------------------------------------------------------------
>
>                 Key: IGNITE-20327
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20327
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Mikhail Petrov
>            Assignee: Mikhail Petrov
>            Priority: Major
>              Labels: ise
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> 1. CQ is registered through the thin client. Assume that we filter out all 
> events except cache entry expired events.
> 2. A huge amount of cache entries expiry on the cluster and the corresponding 
> CQ events are created on the node that holds CQ listener.
> 3. Assume that thin client connection is slow. Thus, all events designated 
> for the thin client are accumulated in the selector queue 
> GridSelectorNioSessionImpl#queue before they are sent. Note, that all thin 
> clients messages stored in the serializes form.
> Here is two main problems 
> 1. Currently EXPIRY and REMOVE CacheContinuousQueryEntry entries are 
> initialized with both oldValue and newValue as a reference to the same object 
> (that was done to meet JCache requirements - see 
> https://issues.apache.org/jira/browse/IGNITE-8714)
> During thin client CQ event serialization, we process both oldValue and 
> newValue independently. As a result, the same value is serialized twice, 
> which can significantly increase the amount of memory consumed by the 
> GridSelectorNioSessionImpl#queue.
> 2. Messages designated to the thin clients are serialized with the use of 
> POOLED allocator. The problem here is that the POOLED allocator allocates 
> memory in powers of two. As a result, if the serialized message is slightly 
> larger than 2^n bytes, then twice as much memory will be allocated to store 
> it.
> As a result each EXPIRY/REMOVE CQ event that is awaiting its sending to the 
> thin client side can consume <expired/removed cache entry size> * 4 of Java 
> Heap.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to