In GemFire environments, users may encounter scenarios where data successfully loaded into GemFire regions appears "missing" during standard lookup operations. Although logs may indicate that data ingestion completed without errors, specific keys cannot be retrieved by the application.
This behavior is typically observed when using complex objects as region keys in conjunction with PDX serialization.
The root cause is a hash code mismatch between the client and server or between the serialized and deserialized states of a key object.
GemFire identifies the bucket location and performs lookups based on the key's hash code. If the hashCode() or equals() implementation of a complex key object is not consistent when serialized, the server may calculate a different hash than the client.
This results in the key being placed in a specific bucket during ingestion, but failing to be located during a get operation because the lookup hash points to a different location or fails the equality check.
Using complex objects as keys is generally considered a non-recommended practice unless specific serialization requirements are met.
To resolve and prevent data visibility issues related to hash code mismatches, implement the following strategies:
https://techdocs.broadcom.com/us/en/vmware-tanzu/data-solutions/tanzu-gemfire/10-1/gf/developing-data_serialization-gemfire_pdx_serialization.html