From issues-return-75925-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Sep 24 20:29:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 50450180649 for ; Mon, 24 Sep 2018 20:29:07 +0200 (CEST) Received: (qmail 94319 invoked by uid 500); 24 Sep 2018 18:29:06 -0000 Mailing-List: contact issues-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 issues@ignite.apache.org Received: (qmail 94310 invoked by uid 99); 24 Sep 2018 18:29:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2018 18:29:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0EE551A2034 for ; Mon, 24 Sep 2018 18:29:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 5NcK_E9Xntj2 for ; Mon, 24 Sep 2018 18:29:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 139575F535 for ; Mon, 24 Sep 2018 18:29:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2DD56E2646 for ; Mon, 24 Sep 2018 18:29:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6D47723FB6 for ; Mon, 24 Sep 2018 18:29:01 +0000 (UTC) Date: Mon, 24 Sep 2018 18:29:01 +0000 (UTC) From: "Nikolay Izhikov (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-1903) Cache configuration is serialized to nodes whether they require it or not MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nikolay Izhikov updated IGNITE-1903: ------------------------------------ Fix Version/s: (was: 2.7) 2.8 > Cache configuration is serialized to nodes whether they require it or not > ------------------------------------------------------------------------- > > Key: IGNITE-1903 > URL: https://issues.apache.org/jira/browse/IGNITE-1903 > Project: Ignite > Issue Type: Bug > Affects Versions: 1.5.0.final > Reporter: Michael Griggs > Priority: Major > Labels: community, usability > Fix For: 2.8 > > > See User discussion thread: http://apache-ignite-users.70518.x6.nabble.com/CacheStore-being-serialized-to-client-td1931.html > Brief summary: When a grid client joins the grid (clientMode=true) it receives a message from the server node(s) on the grid that contains the serialized CacheStore implementation object. If the client does not have this class on its CLASSPATH (and there is no reason it should, as it is a client) then the de-serialization of this message will fail, causing this exception: > {code}SEVERE: Failed to unmarshal discovery data for component: 1 > class org.apache.ignite.IgniteCheckedException: Failed to find class with given class loader for unmarshalling (make sure same versions of all classes are available on all nodes or enable peer-class-loading): sun.misc.Launcher$AppClassLoader@14dad5dc > at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal(JdkMarshaller.java:104) > at org.apache.ignite.marshaller.AbstractMarshaller.unmarshal(AbstractMarshaller.java:67) > at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.onExchange(TcpDiscoverySpi.java:1529) > at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.processNodeAddFinishedMessage(ClientImpl.java:1317) > at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.processDiscoveryMessage(ClientImpl.java:1229) > at org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1199) > at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62) > Caused by: java.lang.ClassNotFoundException: c.g.r.cachewrapper.ignite.CacheMissHandlerIgnite > {code} > where {{c.g.r.cachewrapper.ignite.CacheMissHandlerIgnite}} is the CacheStore implementation. > The ostensible reason for the CacheStore serialization is so that clients of a TRANSACTIONAL cache can begin the transaction on the underlying store. > The only current solution to this is to add the grid node's CacheStore implementation class definition to the CLASSPATH of the client. This creates an *undesirable coupling* between server and client. > --- > *UPDATE (copy-paste from comment below)* > This is actually more generic issue. When a new node joins (client or server), all existing cache configurations (which include cache stores) are sent to this node. It then deserializes it during startup which can cause exceptions on clients or servers where cache is not supposed to be deployed as defined by node filter. > As a solution we can do the following: > * During discovery, send node filter and cache store factory in binary format along with the cache configuration, not as its parts. > * On server, check node filter first and deserialize cache configuration and cache store only if it returns true. In case of error, STOP join process (now we just print exception in log and go on, which is very error-prone). > * On client, do not deserialize cache configuration and cache store until user's code tries to actually use the cache (calls Ignite.cache. If cache is ATOMIC, never deserialize the cache store. -- This message was sent by Atlassian JIRA (v7.6.3#76005)