Re: Externalizable in cache

2016-02-16 Thread Myron Chelyada
Thanks, And sorry for a little bit confusing test I provided. 2016-02-16 13:46 GMT+02:00 Vladimir Ozerov : > Myron, > Thank you for pointing this. it looks like we violate stream contract > because regular Java ObjectOutputStream will return -1 in this case. > Forwarding to dev list. > > Igniter

Re: Externalizable in cache

2016-02-16 Thread Vladimir Ozerov
Alex, In ObjectOutputStream if you read byte array and still have some other data in the stream, it will return you -1. So as I understand, from user perspective it is normal to wait for -1. What do you think? Vladimir. On Tue, Feb 16, 2016 at 2:54 PM, Alexey Goncharuk < alexey.goncha...@gmail.c

Re: Externalizable in cache

2016-02-16 Thread Alexey Goncharuk
Agree that this should be fixed. However, from the end-user perspective this should never be an issue because at some point in future Ignite might need to append some extra bytes to the Externalizable object layout, thus reading beyond that limit will break the unmarshalling process. If, by the ti

Re: Externalizable in cache

2016-02-16 Thread Vladimir Ozerov
Myron, Thank you for pointing this. it looks like we violate stream contract because regular Java ObjectOutputStream will return -1 in this case. Forwarding to dev list. Igniters, As Myron mentioned, out implementation of ObjectInput returns 0 when performing ObjectInput.read(byte[]) and there is