Bug 536479 (RHQ-825)

Summary: change alert cache to lock on a per agent basis
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: AlertsAssignee: Joseph Marques <jmarques>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.1preKeywords: CodeChange
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-825
Whiteboard:
Fixed In Version: 1.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Joseph Marques 2008-09-11 10:31:00 EDT
today, the alerts cache locks on a single global lock.  this is unnecessary as there is only concurrent contention on a per-agent level.  thus, for improved performance, especially during times of loading/reloading/unloading, make sure cache activities lock only as much as necessary.
Comment 1 Joseph Marques 2008-09-11 10:54:56 EDT
pushing out to 1.2 - although changing this strategy wouldn't be hard and could easily be done in the 1.1 timeframe, i'm thinking a better solution would be to use a cache-per-agent mechanism.  instead of having one large cache for each server, we have one central cache manager that creates and destroys smaller caches.  each small cache would be responsible for load/reloading ONLY elements that are for a particular agent (being managed by that server).  then, instead of having to worry about implementing a cache purge mechanism, the entire cache can be thrown away and recreated as necessary.
Comment 2 Joseph Marques 2009-02-08 20:36:28 EST
rev2964 - separate alert cache into global and agent-specific segments; 
this ensures that alerts will not be missing if backfills change the resource availability (as opposed to an AvailabilityReport); 
this ensures that alerts will not be missed if agents are not connected to the cloud when an operation is executed; 
locks are now obtained on a fine-grained, agent-by-agent basis; 
Comment 3 Red Hat Bugzilla 2009-11-10 16:17:40 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-825