You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/05/10 14:06:00 UTC

[jira] [Commented] (GEODE-10276) Refactor PDX (de)serialziation code to align it with Java client

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

ASF GitHub Bot commented on GEODE-10276:
----------------------------------------

gaussianrecurrence opened a new pull request, #969:
URL: https://github.com/apache/geode-native/pull/969

    - Code related to PDX de(serialization) has been refactored and aligned
      (in all possible means) to the Java client, solving the following
      issues:
       * GEODE-9968 - Fix deserialization for new fields in PdxSerializable
         class
       * GEODE-9753 - Coredump during PdxSerializable object serialization
       * GEODE-10220 - Coredump while initializing PdxType remoteToLocal
       * GEODE-10255 - PdxSerializable not working correctly for multiple
         versions of the same class
    - Reverted GEODE-8212, to solve potential issues during (de)serialization.
      This is due to the fact that the server orders PdxType fields
      sequentially, rather than alphabetically.
    - In order to achieve what was originally intended with GEODE-8212,
      now PdxInstances fields are written in alphabetical order, rather
      than in the order writeXX is called.
    - Also, code now should be easier to understand
    - Several tests modified to adapt to code changes
    - Added several UTs to further incrase coverage on PDX (de)serialization code.
    - Added several ITs to verify PDX (de)serialization scenarios.




> Refactor PDX (de)serialziation code to align it with Java client
> ----------------------------------------------------------------
>
>                 Key: GEODE-10276
>                 URL: https://issues.apache.org/jira/browse/GEODE-10276
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Mario Salazar de Torres
>            Assignee: Mario Salazar de Torres
>            Priority: Major
>
> Currently there are the following open issues regarding PDX (de)serialization:
>  * [GEODE-9968 - Fix deserialization for new fields in PdxSerializable class|https://issues.apache.org/jira/browse/GEODE-9968]
>  * [GEODE-9753 - Coredump during PdxSerializable object serialization|https://issues.apache.org/jira/browse/GEODE-9753]
>  * [GEODE-10220 - Coredump while initializing PdxType remoteToLocal|https://issues.apache.org/jira/browse/GEODE-10220]
>  * [GEODE-10255 - PdxSerializable not working correctly for multiple versions of the same class|https://issues.apache.org/jira/browse/GEODE-10255]
> Also, the implementation on this ticket ([GEODE-8212: Reduce connections to server to get type id|https://issues.apache.org/jira/browse/GEODE-8212]) poses some issues with PDX entries which fields are a permutation. Thing is that PdxTypes which fields are a permutation might use the wrong offsets, leading to a corrupt serialization. This is something that was not taken into account at the time of getting this PR merged.
> So this ticket should be reverted and possibly an alternative solution proposed.
> In order to tackle these issues, a code refactoring is needed to introduce the following implementations:
>  * Single type of PdxWriter
>  * An implementation PdxReader that tracks unread data, and other that don't.
>  * An implementation for PdxInstances that guarantees that fields are actually written in alphabetical order, independently of the writeFields call order. This should tackle the issue described above regarding GEODE-8212.
>  * Also, it'd be ideal to make it so PDX code is cleaner and easier to understand, though that's a complex matter, and also, subjective.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)