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

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

gaussianrecurrence commented on pull request #715:
URL: https://github.com/apache/geode-native/pull/715#issuecomment-785976885


   > I wonder if anyone of this is actually necessary. I think this idea of 
clearing the PDX registry is a hold over from the old global world. Under that 
old model if you "closed" the cache it was never really closed, especially from 
the .NET layer, thus it never really cleared the the PDX registry, which was 
also global. Now the PDX registry is owned by Cache and Cache can actually be 
closed. If the Cache is closed the registry is destroyed. I really think we 
should just eliminate all this code.
   
   After a detailed analysis of the problem we were experimenting, quite the 
opposite, this is much necessary. In fact there is the same behaviour in the 
Java client. This behaviour guarantees that if the cluster is restarted and the 
PdxTypeRegistry in the distributed system changes there is no de-sync between 
the client and the server.
   
   It's quite important that there are not PdxType in the client which does not 
exist in the server. Otherwise it could happen that some PDX entries with this 
PdxType are written in the server, corrupting the data in the region.
   
   TBH, I'd rather prefer that written entries which are PdxInstances are 
verified on the server-side, but this would probably increase put time.


----------------------------------------------------------------
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.

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


> Fix PdxTypeRegistry cleanup upon cluster disconnection
> ------------------------------------------------------
>
>                 Key: GEODE-8793
>                 URL: https://issues.apache.org/jira/browse/GEODE-8793
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>    Affects Versions: 1.13.0, 1.13.1
>            Reporter: Mario Salazar de Torres
>            Assignee: Mario Salazar de Torres
>            Priority: Major
>              Labels: pull-request-available
>
> *GIVEN* A native client cache with on-client-disconnect-clear-pdxType-Ids is 
> set to "true" (not the best name if you ask me)
> *WHEN* the connection towards the cluster is lost
> *THEN* PdxTypeRegistry should be cleaned up straight away.
> ----
> *Additional information*
> **Instead of being cleaned up straight away, PdxTypeRegistry it's cleaned up 
> every 2 cluster disconnections.
> Probably the issue is that semaphores in place are missused.
> Consider additionally to change the callback name "cliCallback" as it does 
> not represent the actual functionality here.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to