You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by crenique <cr...@gmail.com> on 2018/08/28 18:49:45 UTC

ICacheEntryProcessor throws BinaryObjectException when WRITE_SYNCHRONIZATION_MODE=FULL_ASYNC

Hi,  We are testing WRITE_SYNCHRONIZATION_MODE=FULL_ASYNC mode to compare
performance to PRIMARY_SYNC.These same code works fine in PRIMARY_SYNC, but
it throws BinaryObjectException on FULL_ASYNC  mode.  Would you please
recommend any way to fix this issue ?Thanks!*Environment: * ignite 2.6 jdk 8 
Windows C# ignite.net*Cache creation: *CREATE TABLE IF NOT EXISTS
UserDataCache(    CacheKey VARCHAR,    AffinityKey LONG,    LastUpdated
TIMESTAMP,    Data VARBINARY(MAX),    PRIMARY KEY (CacheKey,
AffinityKey))WITH ""BACKUPS=2, TEMPLATE=UserDataCache,
WRITE_SYNCHRONIZATION_MODE=FULL_ASYNC, AFFINITYKEY=AffinityKey,
VALUE_TYPE=UserData""*Cache EntryProcessor for data
upsert*[Serializable]public class UserDataUpsertEntryProcessor :
ICacheEntryProcessor<UserDataKey, UserData, UserData, int>{    public int
Process(IMutableCacheEntry<UserDataKey, UserData> entry, UserData addVal)   
{        if (entry.Exists)        {            var updateVal = entry.Value;           
updateVal.LastUpdated = DateTime.UtcNow;            updateVal.Data =
addVal.Data;            entry.Value = updateVal;            return 1;       
}        else        {            entry.Value = addVal;            return 0;       
}    }}*call Invoke*await cache.Invoke(key, new
StateDataUpsertEntryProcessor(), userData);*BinaryObjectException on
FULL_ASYNC
mode*\Ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Binary\BinaryReader.cs,
Ln 537BinaryObjectException: Invalid data on deserialization. Expected:
'System.Int32' But was: null



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: ICacheEntryProcessor throws BinaryObjectException when WRITE_SYNCHRONIZATION_MODE=FULL_ASYNC

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Can you please share a full reproducer project (using Github for example)?
This way people who don't have strong .Net skills can still participate in
solution.

Regards,
-- 
Ilya Kasnacheev


вт, 28 авг. 2018 г. в 21:50, crenique <cr...@gmail.com>:

> Hi, We are testing WRITE_SYNCHRONIZATION_MODE=FULL_ASYNC mode to compare
> performance to PRIMARY_SYNC. These same code works fine in PRIMARY_SYNC,
> but it throws BinaryObjectException on FULL_ASYNC mode. Would you please
> recommend any way to fix this issue ? Thanks! *Environment: * ignite 2.6
> jdk 8 Windows C# ignite.net *Cache creation: * CREATE TABLE IF NOT EXISTS
> UserDataCache ( CacheKey VARCHAR, AffinityKey LONG, LastUpdated TIMESTAMP,
> Data VARBINARY(MAX), PRIMARY KEY (CacheKey, AffinityKey) ) WITH
> ""BACKUPS=2, TEMPLATE=UserDataCache, WRITE_SYNCHRONIZATION_MODE=FULL_ASYNC,
> AFFINITYKEY=AffinityKey, VALUE_TYPE=UserData"" *Cache EntryProcessor for
> data upsert* [Serializable] public class UserDataUpsertEntryProcessor :
> ICacheEntryProcessor<UserDataKey, UserData, UserData, int> { public int
> Process(IMutableCacheEntry<UserDataKey, UserData> entry, UserData addVal) {
> if (entry.Exists) { var updateVal = entry.Value; updateVal.LastUpdated =
> DateTime.UtcNow; updateVal.Data = addVal.Data; entry.Value = updateVal;
> return 1; } else { entry.Value = addVal; return 0; } } } *call Invoke*
> await cache.Invoke(key, new StateDataUpsertEntryProcessor(), userData); *BinaryObjectException
> on FULL_ASYNC mode*
> \Ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Binary\BinaryReader.cs,
> Ln 537 BinaryObjectException: Invalid data on deserialization. Expected:
> 'System.Int32' But was: null
> ------------------------------
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>