We need a new quartz job to scan the inventory looking for resources that have an inventory status of UNINVENTORIED. The job needs to call the existing SLSB that deletes resources. The job needs to first do all the platforms marked as uninventory (which then does all its child resources). Then it deletes all uninventoried servers (and its children). Then finally it deletes all uninventoried services (and its children). This job has the potential to run for very long periods of time, need to make sure we use REQUIRES_NEW and NEVER in the appropriate places. This is probably already done - we can reuse the existing deleteResources method, but I bring it up just to make sure we keep this in mind.
rev4160 - this commit adds asynchronous uninventory and fixes several spots of row contention [RHQ-1187][RHQ-1191][RHQ-1192] - asynchronous uninventory by setting uninventoried resources agent references to null to stop majority agent-side sync, setting the parent to null to take it out of the object graph, using a special UNINVENTORY inventoryStatus so it doesn't conflict with existing semantics around any other state, and using a dummy resourceKey so that the next discovery doesn't collide; [RHQ-1324] - specific timings during uninventory calling reinventory failure are no longer possible because uninventory of the entire resource tree occurs atomically in one bulk update statement, then the agent is notified if successful; [RHQ-2124][RHQ-1656][RHQ-1221] - removed hot spots and various other points of contention by shortening transaction times or using indexes as available for: a) uninventory work, b) cloud manager job, c) check for suspect agent job, d) dynagroup recalculation job, e) alerts cache in-band agent and server status bit setting, f) isAgentBackfilled checking
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1192