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
ISPN-13846 Creating cache with name more then 256 characters long wil… #10068
Conversation
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 think we also need to impose this restriction on embedded caches, as these will also fail if the cache name is > 255 characters.
As well as the check in GlobalConfigurationManagerImpl
we should also check the name size in DefaultCacheManager#defineConfiguration
. This will mean template names are also restricted to < 255
characters, so we should update GlobalConfigurationManagerImpl#createTemplate
to perform the validation.
core/src/main/java/org/infinispan/globalstate/impl/GlobalConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
24a413c
to
662f8c9
Compare
core/src/main/java/org/infinispan/globalstate/impl/GlobalConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/infinispan/manager/DefaultCacheManager.java
Outdated
Show resolved
Hide resolved
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.
Looks good, just a couple of minor points about the tests.
core/src/test/java/org/infinispan/globalstate/GlobalStateTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/infinispan/globalstate/GlobalStateTest.java
Outdated
Show resolved
Hide resolved
…l make the servers crashing on OpenShift
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.
LGTM, just waiting on CI
Thanks @jabolina |
…l make the servers crashing on OpenShift
https://issues.redhat.com/browse/ISPN-13846
Just adding a simple size validation in the name received, before starting to create the cache. AFAIK we dont have any validation of this kind, so any suggestion is welcome.
Creating the cache using the console returns the exception code. Creating the cache through the operator does not cause a server restart and the status contains the error message.