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

Valentin Kulichenko commented on IGNITE-4205:
---------------------------------------------

[~irudyak], the idea behind this is not to deserialize them on server side. One 
of the main features of binary format is that it allows not to deploy classes 
on server and dynamically change the schema. If you deserialize before calling 
the store, this is not possible. But weird thing is that this is controlled by 
{{cacheStoreFactory}} configuration flag, which it's actually set to true in 
your case, so the {{CacheStore}} implementation should get binary objects. Not 
sure why this doesn't work for you...

> CassandraCacheStore should start IgniteThread threads in loadCache() method
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-4205
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4205
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 1.7
>            Reporter: Valentin Kulichenko
>            Assignee: Igor Rudyak
>
> {{CassandraCacheStore.loadCache()}} method starts a generic thread pool for 
> parallel data load. Threads in this thread pool can't deserialize Ignite 
> internal objects (e.g. {{IgniteKernal}}) which can cause unexpected behavior. 
> Here is one of the scenarios:
> * There is column in Cassandra which stores an object as BLOB using 
> {{JavaSerializer}}.
> * {{CacheConfiguration.storeKeepBinary}} is {{true}}.
> * When an object is saved, it's passed to the store as an instance of 
> {{BinaryObject}} which is converted to a byte array and saved in Cassandra.
> * When the same object is loaded in {{loadCache}}, the store takes the byte 
> array and tries to convert it to {{BinaryObject}}. But it can't because this 
> implies calling {{IgnitionEx.localIgnite()}} from non-Ignite thread.
> To fix this we need to provide a thread factory that will create instances of 
> {{IgniteThread}} and use it in the pool that loads the data.
> Most likely the same issue exists in {{CacheAbstractJdbcStore}}.
> And in general, any threads created by Ignite internals should be 
> {{IgniteThread}}-s. This should be revisited.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to