Hello!
I’m attempting to configure a cluster of standalone Keycloak 4.7.0.Final instances to have
their Infinispan data persisted. I’m using JDBCPING to create the cluster, and our user
load is great enough that we don’t want to keep all our sessions in memory.
I’ve configured the “sessions” cache as follows:
<distributed-cache name="sessions" statistics-enabled="true">
<state-transfer timeout="600000" />
<object-memory size="2"/>
<jdbc-store data-source="KeycloakDS" passivation="true"
dialect="MYSQL" purge="false" shared="true">
<table>
<id-column type="VARCHAR(255)"/>
<data-column type="BLOB" name="data"/>
<timestamp-column type="BIGINT(20)"
name="timestamp"/>
</table>
</jdbc-store>
</distributed-cache>
The object-memory size is selected purely for testing purposes, so that I can quickly hit
a point where data will need to be evicted from Infinispan.
The problem I’m running into is that data is only persisted to MySQL is passivation is on,
where it exhibits the predictable passivation behaviour. When I turn passivation to false,
instead of acting as a write-through cache, will all data persisted, no data is persisted
at all. Once I fill the object-memory size, sessions start getting dropped behind the
scenes.
Is this pilot error? Or have I found a bug in Infinispan? DEBUG-level logging doesn’t
reveal any complaints from the underlying systems.
Thanks!
Matthew G P Coe
Platform Software Developer
T 416.969.2365
M 416.427.7315
E mcoe(a)ebay.com
A 500 King Street West, Unit 200, M5V 1L8, Toronto, ON
[Kijiji]