[ZBX-9470] Value cache might try to load values from database even if it has cached the requested range Created: 2015 Apr 10  Updated: 2017 May 30  Resolved: 2015 Apr 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.2.6, 2.4.0, 2.5.0
Fix Version/s: 2.5.0

Type: Incident report Priority: Minor
Reporter: Andris Zeila Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: valuecache
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

To determine if the cache contains the values from the request range value cache:
1) first finds the timestamp of the first requested value,
2) checks if the value is in cached range.

If the system clock advances to a new second (for example from 12:00:00.999 to 12:00:01.000) between those checks the timestamp calculated by (1) will be outside the covered range calculated by (2) and value cache will attempt to load values from database.

To fix it value cache must remember not only the maximum request range, but also the first timestmap of the time range that was read from database. This timestamp will be used to determine if cache contains the requested data for range based requests.

This timestamp must be updated when:
1) values are loaded from database
2) values are dropped from cache
3) value with timestamp less than the first value in cache is being added to cache



 Comments   
Comment by Andris Zeila [ 2015 Apr 15 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9470

Comment by dimir [ 2015 Apr 20 ]

Successfully tested. Please review my small improvements in r53211.

Comment by dimir [ 2015 Apr 21 ]

(1) [S] After discussion we decided to rename db_coverage_start to db_cached_from. Also other places in the code containing coverage should be renamed.

wiper RESOLVED in r53247

<dimir> CLOSED

Comment by dimir [ 2015 Apr 21 ]

Please review my small coment changes in r53255.

wiper Thanks!

Comment by Andris Zeila [ 2015 Apr 21 ]

Released in:

  • pre-2.5.0 r53257
Generated at Tue Apr 23 22:46:56 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.