Bug 535678 (RHQ-2349)

Summary: get check-suspect-agents job to get the new backfiller data in a single query
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Core ServerAssignee: Joseph Marques <jmarques>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: urgent    
Version: unspecifiedCC: jshaughn
Target Milestone: ---Keywords: CodeChange
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-2349
Whiteboard:
Fixed In Version: 1.3 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:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 741450    

Description John Mazzitelli 2009-08-13 18:32:00 UTC
org.rhq.enterprise.server.core.AgentManagerBean.checkForSuspectAgents()

        Query q = entityManager.createNamedQuery(Agent.QUERY_FIND_ALL_SUSPECT_AGENTS);

that query returns a composite. That composite should include the new BACKFILLED column data so we can avoid doing this for each suspected agent:

            if (!availabilityManager.isAgentBackfilled(record.getAgentId())) {

that will then become this:

if (!record.isBackfilled())

effectively reducing this down from N queries to 1 (N being the # of suspected agents)

Comment 1 John Mazzitelli 2009-08-13 18:34:05 UTC
we need this in the PERF branch and trunk

Comment 2 John Mazzitelli 2009-08-13 18:35:54 UTC
along with this, I say we increase the time between check jobs.

Right now its 30s in StartupServlet.

We have a quiet time of 15m right now (recently changed to that).

We could increase the job period to 1minute or even up to 5 minutes (thus we wouldn't detect an agent crash between 16m and 20m depending if we use 1m or 5m check job periods)

Comment 3 Joseph Marques 2009-08-13 18:49:44 UTC
branch 1_2_0_GA_PERF: rev4893 - use backfilled precompute status bit in agent table to prevent N roundtrips back t othe DB for N suspect agents; 

Comment 4 Joseph Marques 2009-09-03 07:11:28 UTC
rev5080 - use backfilled precompute status bit in agent table to prevent N roundtrips back t othe DB for N suspect agents; 

Comment 5 Red Hat Bugzilla 2009-11-10 21:02:40 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2349