mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
avoid run-away PVS caching - clear if over 50,000 entries.
This commit is contained in:
@ -56,6 +56,7 @@ import com.kingsrook.qqq.backend.core.utils.ListingHash;
|
||||
import com.kingsrook.qqq.backend.core.utils.Pair;
|
||||
import com.kingsrook.qqq.backend.core.utils.StringUtils;
|
||||
import com.kingsrook.qqq.backend.core.utils.ValueUtils;
|
||||
import static com.kingsrook.qqq.backend.core.logging.LogUtils.logPair;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -417,6 +418,15 @@ public class QPossibleValueTranslator
|
||||
}
|
||||
}
|
||||
|
||||
for(Map.Entry<String, Map<Serializable, String>> entry : possibleValueCache.entrySet())
|
||||
{
|
||||
int size = entry.getValue().size();
|
||||
if(size > 50_000)
|
||||
{
|
||||
LOG.debug("Found a big PVS cache - clearing it.", logPair("name", entry.getKey()), logPair("size", size));
|
||||
}
|
||||
}
|
||||
|
||||
for(String tableName : fieldsByPvsTable.keySet())
|
||||
{
|
||||
Set<Serializable> values = new HashSet<>();
|
||||
|
Reference in New Issue
Block a user