Skip to content
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

Merged
merged 1 commit into from Apr 26, 2022

Conversation

jabolina
Copy link
Member

…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.

Copy link
Contributor

@ryanemerson ryanemerson left a 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.

@jabolina jabolina force-pushed the ISPN-13846 branch 2 times, most recently from 24a413c to 662f8c9 Compare April 25, 2022 12:58
Copy link
Contributor

@ryanemerson ryanemerson left a 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.

Copy link
Contributor

@ryanemerson ryanemerson left a 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

@ryanemerson ryanemerson merged commit 0b8927b into infinispan:main Apr 26, 2022
@ryanemerson
Copy link
Contributor

Thanks @jabolina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants