[ 
https://issues.apache.org/jira/browse/IGNITE-12543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

LEE PYUNG BEOM updated IGNITE-12543:
------------------------------------
    Description: 
I use Ignite 2.6 version of Java Thin Client.

 

When I put data in the form List<List<SomeObject>>, 

the size of the original 200KB data was increased to 50MB when inquired by 
Ignite servers.

On the Heap Dump, the list element was repeatedly accumulated, increasing the 
data size.

 

When I checked org.apacheignite.internal.binary.BinaryWriterExImpl.java 
doWriteBinaryObject method,
{code:java}
// org.apacheignite.internal.binary.BinaryWriterExImpl.java

    public void doWriteBinaryObject(@Nullable BinaryObjectImpl po) {
        if (po == null)
            out.writeByte(GridBinaryMarshaller.NULL);
        else {
            byte[] poArr = po.array();
            out.unsafeEnsure(1 + 4 + poArr.length +4);
            out.unsafeWriteByte(GridBinaryMarshaller.BINARY_OBJ);
            out.unsafeWriteInt(poArr.length);
            out.writeByteArray(poArr);
            out.unsafeWriteInt(po.start());
        }
    }
{code}
 

Repeat the number of inner lists in a list object of dual structure, allocating 
more wanted space than the original size, which can cause memory errors.

 

This can have very serious consequences. Please check.

 

 

  was:
I use Ignite 2.6 version of Java Thin Client.

 

When I put data in the form List<List<SomeObject>>, 

the size of the original 200KB data was increased to 50MB when inquired by 
Ignite servers.

On the Heap Dump, the list element was repeatedly accumulated, increasing the 
data size.

 

When I checked 
main.java.org.apacheignite.internal.binary.BinaryWriterExImpl.java 
doWriteBinaryObject method,
{code:java}
// main.java.org.apacheignite.internal.binary.BinaryWriterExImpl.java

    public void doWriteBinaryObject(@Nullable BinaryObjectImpl po) {
        if (po == null)
            out.writeByte(GridBinaryMarshaller.NULL);
        else {
            byte[] poArr = po.array();
            out.unsafeEnsure(1 + 4 + poArr.length +4);
            out.unsafeWriteByte(GridBinaryMarshaller.BINARY_OBJ);
            out.unsafeWriteInt(poArr.length);
            out.writeByteArray(poArr);
            out.unsafeWriteInt(po.start());
        }
    }
{code}
 

Repeat the number of inner lists in a list object of dual structure, allocating 
more wanted space than the original size, which can cause memory errors.

 

This can have very serious consequences. Please check.

 

 


> When put List<List<SomeObject>>, the data was increased much larger.
> --------------------------------------------------------------------
>
>                 Key: IGNITE-12543
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12543
>             Project: Ignite
>          Issue Type: Bug
>          Components: thin client
>    Affects Versions: 2.6
>            Reporter: LEE PYUNG BEOM
>            Priority: Major
>
> I use Ignite 2.6 version of Java Thin Client.
>  
> When I put data in the form List<List<SomeObject>>, 
> the size of the original 200KB data was increased to 50MB when inquired by 
> Ignite servers.
> On the Heap Dump, the list element was repeatedly accumulated, increasing the 
> data size.
>  
> When I checked org.apacheignite.internal.binary.BinaryWriterExImpl.java 
> doWriteBinaryObject method,
> {code:java}
> // org.apacheignite.internal.binary.BinaryWriterExImpl.java
>     public void doWriteBinaryObject(@Nullable BinaryObjectImpl po) {
>         if (po == null)
>             out.writeByte(GridBinaryMarshaller.NULL);
>         else {
>             byte[] poArr = po.array();
>             out.unsafeEnsure(1 + 4 + poArr.length +4);
>             out.unsafeWriteByte(GridBinaryMarshaller.BINARY_OBJ);
>             out.unsafeWriteInt(poArr.length);
>             out.writeByteArray(poArr);
>             out.unsafeWriteInt(po.start());
>         }
>     }
> {code}
>  
> Repeat the number of inner lists in a list object of dual structure, 
> allocating more wanted space than the original size, which can cause memory 
> errors.
>  
> This can have very serious consequences. Please check.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to