Skip to content

Commit

Permalink
Compare raw values when merging expiration in WAN [HZ-3661] [5.3.6] (#…
Browse files Browse the repository at this point in the history
…25932)

Backport of #25899

Comparing non-raw values invokes deserialization on the target member,
which should not occur, and a raw value comparison is sufficient for our
checks here. I've run QE's WAN ITs locally, including newly added TTL
tests for the original issue, to verify functionality is not affected.

Related to #25627
Fixes https://hazelcast.atlassian.net/browse/HZ-3661
  • Loading branch information
JamesHazelcast committed Nov 7, 2023
1 parent 22cc289 commit 2078171
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ public boolean merge(MapMergeTypes<Object, Object> mergingEntry,
// changed data and use that. Since this only matters for WAN-received merge events, we can avoid
// additional overhead by checking provenance. Fixes HZ-3392, Backlog for merge changes: HZ-3397
boolean shouldMergeExpiration = provenance != CallerProvenance.WAN
|| valueComparator.isEqual(oldValue, mergingEntry.getValue(), serializationService);
|| valueComparator.isEqual(existingEntry.getRawValue(), mergingEntry.getRawValue(), serializationService);
if (shouldMergeExpiration) {
mergeRecordExpiration(key, record, mergingEntry, now);
}
Expand Down

0 comments on commit 2078171

Please sign in to comment.