Thanks Brian for this info. Can you please elaborate a little bit more here.I am assuming here that import of pdxtypes registry(with the same dsid) , overrides the existing pdxTypes in the cluster?
From: Brian Dunlap <bdunla...@gmail.com> To: dev@geode.apache.org Cc: Hitesh Khamesra <hitesh...@yahoo.com>; Hitesh Khamesra <hkhame...@pivotal.io>; Udo Kohlmeyer <ukohlme...@gmail.com>; Bruce Schuchardt <bschucha...@pivotal.io>; geode <d...@geode.incubator.apache.org> Sent: Monday, November 21, 2016 9:14 AM Subject: Re: Review Request 53867: GEODE-2129 make pdxtype id random(not sequential) Just FYI - We've especially run into PDX collisions when we move region snapshots between separate environments. To get things working, we've needed to blow away all persisted regions including the persisted pdx info. It would be nice to improve snapshot portability. For example load a single region from dev into QA vs. having to load everything. Thanks, Brian - On Mon, Nov 21, 2016 at 8:07 AM, Michael Stolz <mst...@pivotal.io> wrote: > I think we need to be more forceful about requiring different distributed > system id's. This idea of using hashcode seems like a debugging problem > waiting to happen. > > -- > Mike Stolz > Principal Engineer, GemFire Product Manager > Mobile: 631-835-4771 > > On Fri, Nov 18, 2016 at 6:39 PM, Hitesh Khamesra < > hitesh...@yahoo.com.invalid> wrote: > > > Before using hashcode for pdxType creation, we will check whether it is > > available or not. If it's not available then, we will use next available > > id. We have introduced this mechanism to harden the cases where the user > > ends up having two clusters with the same dsid. From: Vishal Rao < > > vishal...@gmail.com> > > To: dev@geode.apache.org; Hitesh Khamesra <hkhame...@pivotal.io> > > Cc: Udo Kohlmeyer <ukohlme...@gmail.com>; Bruce Schuchardt < > > bschucha...@pivotal.io>; geode <d...@geode.incubator.apache.org> > > Sent: Thursday, November 17, 2016 11:51 PM > > Subject: Re: Review Request 53867: GEODE-2129 make pdxtype id random(not > > sequential) > > > > Apologies if this is noise, but wouldn't using the hash code actually > > increase the likelihood of ID collisions? > > > > On Fri, Nov 18, 2016 at 6:11 AM, Hitesh Khamesra <hkhame...@pivotal.io> > > wrote: > > > > > > > > ----------------------------------------------------------- > > > This is an automatically generated e-mail. To reply, visit: > > > https://reviews.apache.org/r/53867/ > > > ----------------------------------------------------------- > > > > > > Review request for geode, Bruce Schuchardt and Udo Kohlmeyer. > > > > > > > > > Repository: geode > > > > > > > > > Description > > > ------- > > > > > > Right now pdxtype id has 4 bytes. Out of those 4 bytes, one byte > reserved > > > for distributed-system-id, this make sure type id generated from > > different > > > cluster has different id. For rest of the three bytes we just increment > > > counter to create new pdxtype id. In the field, we have observed that > > > sometimes this pdxType Id collides. One reason could be they end up > > having > > > same distributed-system-id for the different cluster. > > > Thus to avoid a collision, we will be using hashcode of pdxType for > three > > > bytes of pdxType id. That will reduce the possibility of collision. > > > > > > > > > Diffs > > > ----- > > > > > > geode-core/src/main/java/org/apache/geode/pdx/internal/EnumId.java > > > 5d399eb > > > geode-core/src/main/java/org/apache/geode/pdx/internal/PdxType.java > > > b586f64 > > > geode-core/src/main/java/org/apache/geode/pdx/internal/ > > PeerTypeRegistration.java > > > 0226cca > > > geode-core/src/test/java/org/apache/geode/pdx/ > > PdxAttributesJUnitTest.java > > > c45abce > > > geode-core/src/test/java/org/apache/geode/pdx/ > > PdxSerializableJUnitTest.java > > > 5cd822c > > > geode-wan/src/test/java/org/apache/geode/internal/cache/ > > wan/WANTestBase.java > > > f9c18ec > > > geode-wan/src/test/java/org/apache/geode/internal/cache/ > > > wan/misc/PDXNewWanDUnitTest.java f1e8f42 > > > > > > Diff: https://reviews.apache.org/r/53867/diff/ > > > > > > > > > Testing > > > ------- > > > > > > > > > Thanks, > > > > > > Hitesh Khamesra > > > > > > > > > > > > -- > > "The World is a book, and those who do not travel read only a page." - > St. > > Augustine. > > > > > > >