Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed TransactionalMapProxy with Near Cache #13385

Closed
wants to merge 2 commits into from
Closed

Fixed TransactionalMapProxy with Near Cache #13385

wants to merge 2 commits into from

Commits on Jul 2, 2018

  1. Replaced MapServiceContext serialization calls with SerializationService

    This removes one indirection, which makes inlining easier for the JVM.
    It also shortens the code a bit.
    Donnerbart committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    49d057d View commit details
    Browse the repository at this point in the history
  2. Fixed TransactionalMapProxy with Near Cache

    The Near Cache key for a TransactionalMapProxy was not deserialized when
    it was in binary format, which happens when a Hazelcast client is used.
    
    Another problem was that the Near Cache key was created first, even if
    it was not used at all. Especially with this fix, we might run into an
    unused deserialization, when no Near Cache was configured.
    
    The order of read-only calls is:
    * read value from internal TXN map (always binary key)
    * read value from Near Cache (binary/object key)
    * read value from remote (always binary key)
    
    The Near Cache key creation has been moved behind the TXN map lookup.
    This prevents the key creation if it's not used at all. It uses the
    original and binary key, to prevent a duplicated (de)serialization.
    
    The order of write/remove calls is:
    * remove the value (always binary key)
    * invalidate the Near Cache (binary/object key)
    
    The Near Cache key creation has been moved to the invalidation method,
    so behind all checks if the Near Cache is enabled. This prevents the
    key creation if it's not used at all.
    Donnerbart committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    71d8ed3 View commit details
    Browse the repository at this point in the history