Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3DD57200BE2 for ; Thu, 10 Nov 2016 01:57:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3C7C8160AFA; Thu, 10 Nov 2016 00:57:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B255D160B0D for ; Thu, 10 Nov 2016 01:56:59 +0100 (CET) Received: (qmail 57146 invoked by uid 500); 10 Nov 2016 00:56:58 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 57087 invoked by uid 99); 10 Nov 2016 00:56:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2016 00:56:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B5DFD2C2A66 for ; Thu, 10 Nov 2016 00:56:58 +0000 (UTC) Date: Thu, 10 Nov 2016 00:56:58 +0000 (UTC) From: "Valentin Kulichenko (JIRA)" To: dev@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (IGNITE-4205) CassandraCacheStore should start IgniteThread threads in loadCache() method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 10 Nov 2016 00:57:00 -0000 Valentin Kulichenko created IGNITE-4205: ------------------------------------------- Summary: 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 {{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)