-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinispan Protostream Marshaller #29474
base: main
Are you sure you want to change the base?
Conversation
81b9388
to
81f1ba0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pruivo Do you plan to add the proto compatibility check capabilities as part of this PR or should we create an issue to add that in a subsequent PR? I would be happy with the latter given how large the current PR is.
|
||
@Override | ||
public String toString() { | ||
return String.format("ResourceRemovedEvent [ id=%s, name=%s, eventType=%s]", id, name, eventType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ResourceRemovedEvent/ResourceEvent
|
||
@Proto | ||
public enum Type { | ||
UPDATED, REMOVED, ADDED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a schema evolution POV I think it would make more sense to keep the three event types as distinct messages. That way the schema is more representative of the three logic types and we can easily add new event specific fields to the messages if required.
Obviously there's a lot of duplicated code between these classes, but we could still leverage an abstract class to reduce this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was afraid someone would say that 🤣
Sure, I can revert my changes.
81f1ba0
to
70caa5f
Compare
8e8b859
to
25c5cb1
Compare
Please do not merge until we decide if this should be included in Keycloak 25, or shortly after the release |
Closes keycloak#29394 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
25c5cb1
to
d3bf888
Compare
Closes #29394
I'm gathering earlier feedback and sharing how it will end up.
Pending tasks are:
Out of scope: Existing entries in the session cache will be migrated in PR #29377
Migration
The migration path is under discussion and has the following assumptions:
The most appealing solution is to start a separate, non-clustered Infinispan
CacheManager
with JBoss-Marshalling configured (theCacheManager
is limited to a single marshalled). ThisCacheManager
will be used to read the old session data. Then, we have the following 2 scenariosCacheManager
to read the sessions and store them in the database. The cache is clear at the end.CacheManager
and writes them in the Protostream enabledCacheManager
.