Incorrect count in change history
|Reported by:||Nicklas Nordborg||Owned by:||everyone|
The change history count can be incorrect due to changes in #2002.
It is the caching system used by Hibernate that is the culprit here. The count queries are configured to be cached by Hibernate. Normally this is not a problem since Hibernate knows when things change and can evict entries in the cache when it is needed. In #2002 we changed to logging implementation to bypass Hibernate and use direct SQL instead.
It seems like this may cause Hibernate to hold on to cached values and return incorrect results. The logging system need to force the cache to be evicted whenever new log entries are created. A similar issue was solved for annotations in  (#2000)