openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #12147
[Bug 1009014] [NEW] vacuum on transient model cannot work
Public bug reported:
For transient models there are some methods to automatically unlink old
records, based on age or a count of records.
At the same time there is logic that is intended to only cleanup older
records, after the vaccum function has been called a number of times.
The vacuum function is called:
- from a cronjob
- on each create call on a transient model
problem is that te counter to prevent too frequent calls, is reset on
every call. Therefore vacuum cleaning never gets done:
self._transient_check_count += 1
if (not force) and (self._transient_check_count % self._transient_check_time):
self._transient_check_count = 0
return True
This problem masks another problem: if configuration is based on a
maximum count of records, then when cleaning is done ALL existing
records will be deleted. This might not be a problem is only one user is
using the transient model at that time. But with multiple users, this is
bound to result in errors...
Therefore:
- the counter should ONLY be reset when actual cleaning is done.
- cleaning on number of records should leave a minimum amount of records, or alternatively, only delete records that have not been changed in say 10 minutes.
I will create a branch containing these changes...
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1009014
Title:
vacuum on transient model cannot work
Status in OpenERP Server:
New
Bug description:
For transient models there are some methods to automatically unlink
old records, based on age or a count of records.
At the same time there is logic that is intended to only cleanup older
records, after the vaccum function has been called a number of times.
The vacuum function is called:
- from a cronjob
- on each create call on a transient model
problem is that te counter to prevent too frequent calls, is reset on
every call. Therefore vacuum cleaning never gets done:
self._transient_check_count += 1
if (not force) and (self._transient_check_count % self._transient_check_time):
self._transient_check_count = 0
return True
This problem masks another problem: if configuration is based on a
maximum count of records, then when cleaning is done ALL existing
records will be deleted. This might not be a problem is only one user
is using the transient model at that time. But with multiple users,
this is bound to result in errors...
Therefore:
- the counter should ONLY be reset when actual cleaning is done.
- cleaning on number of records should leave a minimum amount of records, or alternatively, only delete records that have not been changed in say 10 minutes.
I will create a branch containing these changes...
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1009014/+subscriptions
Follow ups
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Lara Freeke (Therp), 2013-01-23
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Raphael Collet (OpenERP), 2012-12-21
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Launchpad Bug Tracker, 2012-10-24
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Launchpad Bug Tracker, 2012-10-24
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Stefan Rijnhart (Therp), 2012-10-15
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Stefan Rijnhart (Therp), 2012-07-23
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Launchpad Bug Tracker, 2012-06-06
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Launchpad Bug Tracker, 2012-06-06
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Ronald Portier (Therp), 2012-06-06
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Launchpad Bug Tracker, 2012-06-06
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Ronald Portier (Therp), 2012-06-06
-
[Bug 1009014] Re: vacuum on transient model cannot work
From: Jignesh Rathod(OpenERP), 2012-06-06
-
[Bug 1009014] [NEW] vacuum on transient model cannot work
From: Ronald Portier (Therp), 2012-06-05
References