[ZCM] [ZC] 2306/ 2 Comment "Pdata objects can not be Pickled once the chain is longer than 500"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Sat, 01 Sep 2007 05:05:30 -0400
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #2306 Update (Comment) "Pdata objects can not be Pickled once the chain is longer than 500" Status Pending, Zope/bug medium To followup, visit: http://www.zope.org/Collectors/Zope/2306 ============================================================== = Comment - Entry #2 by ajung on Sep 1, 2007 5:05 am Please submit a *simple* testcase on top of ZopeTestCase but not on top of PloneTestCase with lots of different dependencies from other products. ________________________________________ = Request - Entry #1 by esrever_otua on Apr 5, 2007 6:19 am Uploaded: "pdata_failing_testcase.tar.gz" - http://www.zope.org/Collectors/Zope/2306/pdata_failing_testcase.tar.gz/view In OFS.Image there is a 'File' class and 'Pdata' wrapper class. Pdata objects are designed to operate efficiently with large amounts of data by allowing themselves to be chained together in a C linked-list, while presenting an interface as if to a single object at the head of the list. The 'File' class (which is used for, EG, ATFile, CMFFile, etc) stores its data internally in a Pdata object. It provides a 'manage_upload()' interface for modifying or supplying data to be stored in the File. This function splits the data into 64KB chunks and assigns each chunk to a new Pdata object in the C linked-list Pdata chain. Once a file more than 32MB has been stored via manage_upload(), the File object can no longer be dumped with the Pickler() class. EG, cPickle.Pickler.dump(OFS.Image.File) fails when the data stored in OFS.Image.File is greater than 32MB and was stored via the supplied manage_upload() interface. The error is a RuntimeError for maximum recursion being hit. Attached is a simple ZopeTestCase that demonstrates the problem. ==============================================================