You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/09/28 11:38:30 UTC

[GitHub] [geode] miguelmt commented on a diff in pull request #7861: GEODE-10423: Document the system property “ON_DISCONNECT_CLEAR_PDXTYP…

miguelmt commented on code in PR #7861:
URL: https://github.com/apache/geode/pull/7861#discussion_r982291787


##########
geode-docs/developing/data_serialization/PDX_Serialization_Features.html.md.erb:
##########
@@ -31,6 +31,31 @@ When you serialize an object using PDX, <%=vars.product_name%> stores the object
 
 This centralization of object type information is advantageous for client/server installations in which clients and servers are written in different languages. Clients pass registry information to servers automatically when they store a PDX serialized object. Clients can run queries and functions against the data in the servers without compatibility between server and the stored objects. One client can store data on the server to be retrieved by another client, with no requirements on the part of the server.
 
+**Note:**
+In some cases pdx registry may be lost, the cases include but not limited to the following:
+
+-   A backup was restored, and such backup is missing pdx registry.

Review Comment:
   In my opinion, the scenarios where the central registry of the PDX domain object metadata are lost but the contents of the database remain unaffected are unlikely.
   
   The proposed change (gemfire.ON_DISCONNECT_CLEAR_PDXTYPEIDS system property) would not fix such use cases, or, to be precise, would not fix them _completely_: if a new client reads an object of a PDX type that's missing from the central registry, it would still get an "Unknown PDX type" error if the read operation happens _before_ other client writes an object of that PDX type (and adds that PDX type to the central registry) even if both clients have cleared their PDX type caches.
   
   Here's a suggestion for the text in these lines:
   
   8<------------------
   
   **Note**: There are situations where some of the information in the central registry of the PDX domain object metadata is lost, e.g. when restoring an old backup with an outdated central registry.
    
   When that happens, new clients connecting to the cluster for the first time will get outdated PDX type information from the central registry, but, since information in the central registry is cached by clients, old clients may have fresher information about PDX types than the central registry does. That will result into inconsistent information about PDX types spread across the system:
    
   - old clients have fresh information
   - the central registry has outdated information
   - new clients have outdated information
    
   If old clients write entries of a PDX type they know but the central registry doesn't, new clients will get "Unknown PDX type" errors when they read those objects.
    
   To avoid this problem, clients may be configured with the system property in the table below to clear their PDX type cache when they disconnect from the cluster. After clearing their cache, old clients will re-generate type information for all PDX types, including the types the central registry "forgot". Since new PDX type information will be written in the central registry before entries of that type are written in the cluster, the central registry and all clients, old and new, will store consistent PDX type information.
   
   8<------------------
   
   in the hope that it is useful.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org