Hi.
I had a lot of items with history time set to 365 days. Last time I changed this to 7 days and ... history remains and only some entries are deleted each hour. I started digging in housekeeper and I found two things whitch I can't understand:
1. When you prepare list of items for history delete, there is a sql:
select itemid,lastdelete,history,delay from items where lastdelete<=%d.
There always select all items (I can't imagine situation with lastdelete in future).
2. When deleting items history:
delete from history where itemid=%d and clock<%d limit %d
where limit is 2*CONFIG_HOUSEKEEPING_FREQUENCY*3600/item.delay (2x number of samples in CONFIG_HOUSEKEEPING_FREQUENCY). Why this limit is here and why this is only in HAVE_MYSQL condition?
BTW: Thanks for the geat tool.
I had a lot of items with history time set to 365 days. Last time I changed this to 7 days and ... history remains and only some entries are deleted each hour. I started digging in housekeeper and I found two things whitch I can't understand:
1. When you prepare list of items for history delete, there is a sql:
select itemid,lastdelete,history,delay from items where lastdelete<=%d.
There always select all items (I can't imagine situation with lastdelete in future).
2. When deleting items history:
delete from history where itemid=%d and clock<%d limit %d
where limit is 2*CONFIG_HOUSEKEEPING_FREQUENCY*3600/item.delay (2x number of samples in CONFIG_HOUSEKEEPING_FREQUENCY). Why this limit is here and why this is only in HAVE_MYSQL condition?
BTW: Thanks for the geat tool.
Comment