Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E5C1A18E9E for ; Fri, 18 Dec 2015 18:05:53 +0000 (UTC) Received: (qmail 83493 invoked by uid 500); 18 Dec 2015 18:05:47 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 83342 invoked by uid 500); 18 Dec 2015 18:05:47 -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 83103 invoked by uid 99); 18 Dec 2015 18:05:47 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2015 18:05:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8C7BCC064D for ; Fri, 18 Dec 2015 18:05:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.426 X-Spam-Level: ** X-Spam-Status: No, score=2.426 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.554, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ZGpdv_t_bbxC for ; Fri, 18 Dec 2015 18:05:35 +0000 (UTC) Received: from SNT004-OMC3S19.hotmail.com (snt004-omc3s19.hotmail.com [65.55.90.158]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 3ED9E2148B for ; Fri, 18 Dec 2015 18:05:33 +0000 (UTC) Received: from SNT147-W73 ([65.55.90.136]) by SNT004-OMC3S19.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 18 Dec 2015 10:05:26 -0800 X-TMN: [LtcszC0ShhfkTSoJ9VIu8M2IsjJ7Gmzx] X-Originating-Email: [andrewkornev@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="_9cf256bd-30ec-4ce5-8be7-77ed0c254248_" From: Andrey Kornev To: "dev@ignite.apache.org" Subject: RE: CacheEntry serialization failure Date: Fri, 18 Dec 2015 10:05:26 -0800 Importance: Normal In-Reply-To: References: ,,,,, MIME-Version: 1.0 X-OriginalArrivalTime: 18 Dec 2015 18:05:26.0721 (UTC) FILETIME=[AC44BB10:01D139BE] --_9cf256bd-30ec-4ce5-8be7-77ed0c254248_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In this particular case=2C the class that fails is a non-static inner class= that extends another non-static inner class=2C so they both end up having = the compiler-generated "this$0" field. Regards Andrey > Date: Fri=2C 18 Dec 2015 20:44:12 +0300 > Subject: Re: CacheEntry serialization failure > From: vozerov@gridgain.com > To: dev@ignite.apache.org >=20 > The most straightforward solution which comes to my mind - *do not ever u= se > BinaryMarshaller by default*. Always fallback to OptimizedMarshaller unle= ss > user explicitly asked us to use binary format (e.g. through package > wildcards). >=20 > BTW=2C we already do this for Externalizable and readObject/writeObject. >=20 > On Fri=2C Dec 18=2C 2015 at 8:41 PM=2C Vladimir Ozerov > wrote: >=20 > > Ah=2C I saw your problem with DirectedSpecifics. We need to think about= how > > to solve it. Here is the case: > > 1) Class is Serilzable and cannot be changed=3B > > 2) There are several duplicated field names=3B > > =3D> BinaryMarshaller cannot handle it. > > > > Any thoughts? > > > > On Fri=2C Dec 18=2C 2015 at 8:34 PM=2C Vladimir Ozerov > > wrote: > > > >> I fixed the problem=2C it was a bug actually. > >> > >> By default classes which has some custom Java logic (e.g. Externalizab= le=2C > >> or with writeObject/readObject methods) will be written using > >> OptimizedMarshaller=2C so similar field names is not a problem. > >> If you want to serialize such class in binary format and have duplicat= e > >> field names=2C you should provide your own BinarySerializer=2C which w= ill write > >> these fields with different names. > >> > >> On Fri=2C Dec 18=2C 2015 at 8:07 PM=2C Andrey Kornev > >> wrote: > >> > >>> How am I supposed to handle this situation if the class comes from a = 3d > >>> party I can't modify? > >>> > >>> Thanks > >>> Andrey > >>> > >>> > Date: Fri=2C 18 Dec 2015 09:12:22 +0300 > >>> > Subject: Re: CacheEntry serialization failure > >>> > From: vozerov@gridgain.com > >>> > To: dev@ignite.apache.org > >>> > > >>> > I'll take a look. > >>> > > >>> > On Fri=2C Dec 18=2C 2015 at 4:37 AM=2C Valentin Kulichenko < > >>> > valentin.kulichenko@gmail.com> wrote: > >>> > > >>> > > Folks=2C > >>> > > > >>> > > It looks like CacheEntry implementation (i.e.=2C the entry that > >>> contains > >>> > > version) can't be properly serialized with the BinaryMarshaller. = I > >>> created > >>> > > the test and the ticket: > >>> https://issues.apache.org/jira/browse/IGNITE-2203 > >>> > > > >>> > > Can someone take a look? > >>> > > > >>> > > -Val > >>> > > > >>> > >>> > >> > >> > > = --_9cf256bd-30ec-4ce5-8be7-77ed0c254248_--