[ZBX-3463] configuration parameter MaxHousekeeperDelete is ignored for IBM DB2 Created: 2011 Jan 26 Updated: 2017 May 30 Resolved: 2011 Jun 06 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 1.8.4 |
Fix Version/s: | 1.8.6 |
Type: | Incident report | Priority: | Major |
Reporter: | Aleksandrs Saveljevs | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
As the summary says, MaxHousekeeperDelete is ignored for IBM DB2. Everything that can be thrown away is deleted. |
Comments |
Comment by Aleksandrs Saveljevs [ 2011 Jun 03 ] |
IBM DB2 does not seem to have a way to limit the number of rows deleted like, for instance, MySQL does (e.g., "delete from history where itemid=18467 limit 10;"). Two solutions are suggested here: http://www.dbforums.com/db2/1003624-delete-top-n-rows.html. The first (with select) works only for tables with a unique identifier and we do not have unique identifiers in history tables, the second is based on views and it is not clear how efficient this would be performance-wise. However, we require Oracle compatibility enabled in order for the frontend to work, see https://support.zabbix.com/browse/ZBXNEXT-538?focusedCommentId=34562&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_34562. So I figured we can use the limiting mechanism used in Oracle: "delete from history where itemid=18467 and rownum<=10". This approach is available in development branch svn://svn.zabbix.com/branches/dev/ZBX-3463. |
Comment by Alexander Vladishev [ 2011 Jun 06 ] |
Successfully tested! |
Comment by Aleksandrs Saveljevs [ 2011 Jun 06 ] |
Fixed in pre-1.8.6 in r20099. |