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

Enhance log for key size check #153

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

shy-1234
Copy link

The original error message lacked the information for end users to take action. Also added a log so that the information can still be accessed even when the exception is swallowed.

@@ -215,7 +215,9 @@ EVCacheKey getEVCacheKey(final String key) {
}

if (canonicalKey.length() > this.maxKeyLength.get() && !hashKey.get() && !autoHashKeys.get()) {
throw new IllegalArgumentException("Key is too long (maxlen = " + this.maxKeyLength.get() + ')');
final String errMsg = String.format("CanonicalKey ``%s`` is too long (maxLen = %d, keyLen = %d, canonicalKeyLen = %d)", canonicalKey, this.maxKeyLength.get(), key.length(), canonicalKey.length());

Choose a reason for hiding this comment

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

is it possible to add the evcache_app that is causing this? the one that is being written to or read from

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

Successfully merging this pull request may close these issues.

3 participants