Bug 1017707

Summary: 6 hour and 24 hour metrics expire too soon
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: MonitoringAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.9CC: ahovsepy, hrupp
Target Milestone: ---   
Target Release: RHQ 4.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1017710 (view as bug list) Environment:
Last Closed: 2014-04-23 12:31:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 951619, 1017710    
Attachments:
Description Flags
diff.png none

Description John Sanda 2013-10-10 11:19:47 UTC
Description of problem:
We use Cassandra's time to live (TTL) feature to let metric data age out automatically without having to explicitly delete it. Both 6 hour and 24 hour data are getting stored with the 1 hour data TTLs. Here are the prepared statements used to store the respective data,

insertSixHourData = storageSession.prepare("INSERT INTO " + MetricsTable.SIX_HOUR + "(schedule_id, time, " +
            "type, value) VALUES (?, ?, ?, ?) USING TTL " + configuration.getOneHourTTL());

insertTwentyFourHourData = storageSession.prepare("INSERT INTO " + MetricsTable.TWENTY_FOUR_HOUR + "(schedule_id, " +
            "time, type, value) VALUES (?, ?, ?, ?) USING TTL " + configuration.getOneHourTTL());


They are both using configuration.getOneHourTTL(), but it should be configuration.getSixHourTTL() and configuration.getTwentyFourHourTTL() respectively.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2013-10-10 11:25:47 UTC
Fix pushed to master.

commit hash: c115ca0dc5d1

Comment 2 John Sanda 2013-10-10 13:33:57 UTC
Previous commit missed the the 6 hour ttl. It has been fixed and committed to master.

commit hash: fc05a8514

Comment 3 Armine Hovsepyan 2013-10-11 10:27:14 UTC
verified the mehtod in of source diff. . 
please get attached the screen-shot

Comment 4 Armine Hovsepyan 2013-10-11 10:29:06 UTC
Created attachment 810973 [details]
diff.png

Comment 5 Heiko W. Rupp 2014-04-23 12:31:25 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.