Bug 1099736

Summary: Increase cache retention for statistics
Product: [Retired] Zanata Reporter: Carlos Munoz <camunoz>
Component: Component-Persistence, PerformanceAssignee: Alex Eng <aeng>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4CC: dchen, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 3.5   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: 3.5.0-SNAPSHOT (git-server-3.4.1-52-g47cdeb5) Doc Type: Bug Fix
Doc Text:
Story Points: 3
Clone Of: Environment:
Last Closed: 2015-01-26 23:27:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Carlos Munoz 2014-05-21 05:37:57 UTC
Statistic cache elements should overflow to disk. They should be wiped upon app startup, and last as long as the server is running.
Ensure that there is a way of clearing the stats cache individually.
Cache generation is currently happening on-demand.

Comment 1 Carlos Munoz 2014-05-21 05:48:24 UTC
Maybe we should make the cache eternal, as long as there is a way of clearing the cache.

- Performance (lacking base line for performance testing)
- Some level of stats regression testing

Comment 2 Sean Flanigan 2014-05-22 07:46:50 UTC
We need to make sure the cache isn't flushed to disk synchronously on every single update, or translation updates will probably become too expensive.

Some options which might help:

1. Enable async writes: http://ehcache.org/documentation/2.5/apis/write-through-caching

2. Only flush to disk: http://ehcache.org/documentation/2.5/faq#how-do-i-get-a-memory-only-cache-to-persist-to-disk-between-vm-restarts

Comment 3 Alex Eng 2014-05-29 03:22:10 UTC
Pull request:

Comment 4 Ding-Yi Chen 2014-06-02 04:43:53 UTC
A few more issues:

 * Property ehcache.disk.store.dir should be given.
   * Installation guide should be updated.
   * zanata-setup.sh should be updated.
 * The cache will not be wiped out during server restart.
 * The cache will updated on events on
   * Translator translates a new string.
   * Translator clear a string.
   * Translator change state from FUZZY -> Translated
   * Review change state from Translated -> Rejected.

Comment 5 Ding-Yi Chen 2014-06-03 00:26:45 UTC
VERIFIED with Zanata 3.5.0-SNAPSHOT (git-server-3.4.1-52-g47cdeb5)