Are osv_memory objects pruned?

Asked by Numérigraphe

Dear community,
If I got it right, osv_memory are plain osv objects, only kept in memory instead of stored in a database.
As such, it seems that you can create as many records of these objects as you wish - billions of them if you want.
Of course these records are lost when the server stops.
Now my question is: what happens if the server doesn't stop? Will the memory be released somehow or will the records be kept as long as the server runs?
Lionel

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Vinay Rana (OpenERP)
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello Numérigraphe ,

*If the server doesn't stop?
=>The records are keep as long as the server runs until you will not delete those record manually.

Thanks.

Revision history for this message
Numérigraphe (numerigraphe) said :
#2

Thanks for this clear answer.
Lionel.

Revision history for this message
Numérigraphe (numerigraphe) said :
#3

While investigating the features of osv_memory, I noticed the "vacuum" function in orm_memory.
It looks like it could prune older in-memory records.
Is this done regularly by the server? Should it?
Lionel

Revision history for this message
Best Vinay Rana (OpenERP) (vra-openerp) said :
#4

Hello Numérigraphe,

Yes vacuum function will unlink the number of record data automatically in following two situation:

1). The data are remains in more then 1 hour.
2). If total number of records are more then 200 then it will automatically delete all remaining number of records except 200.

Thanks.

Revision history for this message
Numérigraphe (numerigraphe) said :
#5

Thanks vra (openerp), that solved my question.