← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 555271] Re: Number of ressources in osv.osv_memory object

 

Olivier,

a few remarks:
1) some other robust platforms (example Java servers) use to have a global
budget for session memory. Once you reach that limit (no matter how you fill
it), you get an ou of memory Exception. I think this is much more flexible
and explicit. It's alright OpenERP to say it's better than that the Java
platform, but in that case it just at least do an equivalent job or better.
Not just implement it's own hacky memory limit and session garbage... Isn't
there some robust standardized equivalent of Session management in Python?
2) at least an Exception should be raised when you reach the limit. Imagine
you reach it while processing accounting data, currently you could miss half
the records silently... Failing is OK, memory is limited anyway, but you
should be warned.
3) if there is such a hard limit, at least it should go in the global
configuration so it's explicit it's a parameter you can tweak to adapt your
need, just like you could give more memory to some application for instance.

Thanks for re-opening that bug. For the record, here is the cross link to my
original report where a large picking couldn't be processed:
https://bugs.launchpad.net/openobject-addons/+bug/709559
I'll make my best to look at the perf aspect of it on my side.

Regards


On Mon, Jan 31, 2011 at 7:47 AM, Olivier Dony (OpenERP) <
555271@xxxxxxxxxxxxxxxxxx> wrote:

> Actually, as we've seen with a recent duplicate of this bug, this is a real
> issue - let me reopen it.
> We're working on a solution...
>
> ** Changed in: openobject-server
>   Importance: Undecided => High
>
> ** Changed in: openobject-server
>       Status: Invalid => Confirmed
>
> ** Changed in: openobject-server
>    Milestone: None => 6.0.2
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Server.
> https://bugs.launchpad.net/bugs/555271
>
> Title:
>   Number of ressources in osv.osv_memory object
>
> Status in OpenERP Server:
>  Confirmed
>
> Bug description:
>  On a wizard based on two osv.osv_memory objects with one2many
>  relationship, i canno't create more than 211 lines in the "many"
>  object.
>
>  I want to do a "pre" import of many csv lines into the osv.osv_memory
>  object before validating in the wizard and do the actual import in an
>  osv.osv object.
>
>  i made a simple scenario to check if it was a bug :
>
>  from osv import fields,osv
>
>  class test_school(osv.osv_memory):
>      def _do_import(self, cr, uid, ids, context={}):
>          myself=self.browse(cr, uid, ids, context)[0]
>          for i in range(0,myself.size):
>              self.pool.get("test.person").create(cr, uid, {
>                  "name":"Doe",
>                  "age":i,
>                  "school_id":myself.id
>              })
>          return True
>
>      _name = "test.school"
>      _columns = {
>          "name":fields.char("name",size=20),
>          "size":fields.integer("size"),
>          "students":fields.one2many("test.person","school_id","students"),
>      }
>  test_school()
>
>  class test_person(osv.osv_memory):
>      _name = "test.person"
>      _columns = {
>          "name":fields.char("name",size=20),
>          "age":fields.integer("age"),
>
>  "school_id":fields.many2one("test.school","school",ondelete="cascade"),
>      }
>  test_person()
>
>  This is a silly example but you can make tests with size over 211 :
>  the number of lines will remains 211 (sometimes 201...) and only the
>  last added lines will remain in the table...
>
>
>

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/555271

Title:
  Number of ressources in osv.osv_memory object

Status in OpenERP Server:
  Confirmed

Bug description:
  On a wizard based on two osv.osv_memory objects with one2many
  relationship, i canno't create more than 211 lines in the "many"
  object.

  I want to do a "pre" import of many csv lines into the osv.osv_memory
  object before validating in the wizard and do the actual import in an
  osv.osv object.

  i made a simple scenario to check if it was a bug :

  from osv import fields,osv

  class test_school(osv.osv_memory):
      def _do_import(self, cr, uid, ids, context={}):
          myself=self.browse(cr, uid, ids, context)[0]
          for i in range(0,myself.size):
              self.pool.get("test.person").create(cr, uid, {
                  "name":"Doe",
                  "age":i,
                  "school_id":myself.id
              })
          return True

      _name = "test.school"
      _columns = {
          "name":fields.char("name",size=20),
          "size":fields.integer("size"),
          "students":fields.one2many("test.person","school_id","students"),
      }
  test_school()

  class test_person(osv.osv_memory):
      _name = "test.person"
      _columns = {
          "name":fields.char("name",size=20),
          "age":fields.integer("age"),
          "school_id":fields.many2one("test.school","school",ondelete="cascade"),
      }
  test_person()

  This is a silly example but you can make tests with size over 211 :
  the number of lines will remains 211 (sometimes 201...) and only the
  last added lines will remain in the table...





References