Skip to content

Commit

Permalink
Enable state transfer even if a remote cache is enabled (#592)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Schwartz <[email protected]>
  • Loading branch information
ahus1 authored Nov 17, 2023
1 parent f75ca3d commit f102db7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ include::example$helm-keycloak-config/kcb-infinispan-cache-remote-store-config.x
<2> For the address to the remote store, reference two environment variables for host name and port number.
<3> For authentication, reference two environment variables for username and password.
<4> To secure the remote store connection, use the Kubernetes mechanisms of the pre-configured truststore.
<5> New tag `<state-transfer />` to avoid a state transfer on node startup and instead use the remote store.
This speeds up the startup of new nodes.

.. Prepare an Infinispan Cache configuration XML from the file `cache-ispn.xml` which is part of the Keycloak distribution:
For each `replicated-cache` entry, add the tag `<persistence />` as shown below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
</security>
</remote-store>
</persistence>
<state-transfer enabled="false"/> <!--5-->
</distributed-cache>
<!--end::keycloak-ispn-remotestore[] -->
<distributed-cache name="authenticationSessions" owners="2" statistics="true">
Expand Down Expand Up @@ -100,7 +99,6 @@
</security>
</remote-store>
</persistence>
<state-transfer enabled="false"/>
</distributed-cache>
<distributed-cache name="offlineSessions" owners="2" statistics="true">
<expiration lifespan="-1"/>
Expand Down Expand Up @@ -128,7 +126,6 @@
</security>
</remote-store>
</persistence>
<state-transfer enabled="false"/>
</distributed-cache>
<distributed-cache name="clientSessions" owners="2" statistics="true">
<expiration lifespan="-1"/>
Expand All @@ -155,7 +152,6 @@
</security>
</remote-store>
</persistence>
<state-transfer enabled="false"/>
</distributed-cache>
<distributed-cache name="offlineClientSessions" owners="2" statistics="true">
<expiration lifespan="-1"/>
Expand All @@ -182,7 +178,6 @@
</security>
</remote-store>
</persistence>
<state-transfer enabled="false"/>
</distributed-cache>
<distributed-cache name="loginFailures" owners="2" statistics="true">
<expiration lifespan="-1"/>
Expand All @@ -209,7 +204,6 @@
</security>
</remote-store>
</persistence>
<state-transfer enabled="false"/>
</distributed-cache>
<local-cache name="authorization" simple-cache="true" statistics="true">
<encoding>
Expand Down Expand Up @@ -284,7 +278,6 @@
</security>
</remote-store>
</persistence>
<state-transfer enabled="false"/>
</distributed-cache>
</cache-container>
</infinispan>

2 comments on commit f102db7

@yasammez
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove the mention of <state-transfer> in line 23 as well.

@ahus1
Copy link
Contributor Author

@ahus1 ahus1 commented on f102db7 Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, fixed in 1eb92f7

Please sign in to comment.