Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
WriteBehindMapStore + OBJECT in-memory maps cause EntryProcessors to serialize objects #7040
The issue is on line 103 of WriteBehindMapStore.java (Hazelcast 3.5.4):
This causes all EntryProcessor runs that call entry.setValue() to serialize the object, leading to lower performance, similar to that of BINARY in-memory format.
Any particular reason for this serialization? This renders OBJECT in-memory format not viable when using write-behind with Hazelcast.
Write-behind can be used to persist all states of an entry.
If in-memory-format is OBJECT, there is a possibility that a previous state of an entry can be overwritten by a subsequent write operation while both are waiting in the write-behind-queue because they are referencing to the same entry value. To prevent this, we are taking a snapshot by converting value to binary/data, otherwise we can lost a state.
The behavior you suggest makes sense if coalescing is disabled, but not when it's enabled.