You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "David Johnson (JIRA)" <ji...@apache.org> on 2016/04/09 14:58:25 UTC
[jira] [Created] (USERGRID-1277) Application ID cache should not
cache Optionals
David Johnson created USERGRID-1277:
---------------------------------------
Summary: Application ID cache should not cache Optionals
Key: USERGRID-1277
URL: https://issues.apache.org/jira/browse/USERGRID-1277
Project: Usergrid
Issue Type: Bug
Reporter: David Johnson
Assignee: David Johnson
The Application ID cache in CpEntityManagerFactoryImpl caches Optional<UUID> even when o.isPresent() is false. When there is a problem retrieving an application ID from Cassandra and the ID comes back as null, we cache that value and, until the cache entry expires 60 seconds later, the cache returns null for that application and Usergrid throws an NPE, server error 500, etc.
The cache logic should be simplified and we should cache UUIDs and not Optionals.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)