Hazelcast backups are not removed when entry expires

8 views
Skip to first unread message

Michael Horák

unread,
Oct 12, 2022, 3:42:22 AM10/12/22
to Hazelcast

Hello,

I have an embedded Hazelcast 5.1.3 and I am having some troubles with entry expiration.

Map config:

hz.getConfig()
.addMapConfig(new MapConfig("session_map")        .setInMemoryFormat(InMemoryFormat.OBJECT)
.setBackupCount(1) 
 .setAsyncBackupCount(0)
.setStatisticsEnabled(true));

My entries are websocket sessions which contains some user specific data. By default, there is no TTL or Max Idle time. When a user disconnect, I set a TTL (30s) to the entry just in case that user connects back within the TTL timeout so I can restore the session.

When the entry expire, the entry is removed from the map (so there is no owner for the entry) but the entry backup is still present on the replica node.

So when I crash a node, the other node will recover backups which were expired and they are not valid anymore.

So my question is, why the backups are never removed when entry expires ?? Is there any settings that I am missing ?

Thanks for help

Neil Stevenson

unread,
Oct 12, 2022, 3:45:40 AM10/12/22
to Hazelcast
Reply all
Reply to author
Forward
0 new messages