[Zope-dev] uncataloging objects

Robert Prosenc r.prosenc@matrixware.at
Tue, 2 Jan 2001 22:46:50 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_00BF_01C0750D.E5353CF0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

hi there.

i have certain problems with the catalog class. i have something over 9000
objects (all of the same type) cataloged, and it does not only take REAL
long to reindex them (but hey, i could live with that), sometimes it also
makes the python-process sort of 'hang up' - it merly crushes the whole zope
process......

the even bigger problem is that it makes trouble when uncataloging
objects....that seems to fail completely:
  here's some code from the class-definition, where i try to uncatalog the
object:

        def killMe(self):
                "deletes the record. in fact the record has to be
uncataloged first."
                try:
 
self.Catalog.uncatalog_object('/'+self.absolute_url(1))
                except:
                        return "couldn't uncatalog the record."
                try:
                        self.records.manage_delObjects(ids=self.getId())
# 'records' is a folder, in which the objects are stored
                except:
                        return "couldn't delete the record."
                return Globals.MessageDialog(
                                titel='Record deleted',
                                message='Record deleted successfully.',
                                )

so i let my objects kill themselves;)
what really confuses me is the fact that while performing that function, no
exeption is raised. the uncataloging-call is inside a try/except, but it
seems to be performed regulary. but: it isn't!
the object, while already deleted, remains still cataloged, which leads to
some unpleasant error-pages (key-error) when contained inside the result-set
of a search.

i have a zope 2.2.2 under linux installed, with hotfixes 2000-10-02,
2000-10-11, 2000-12-08, 2000-12-15a and 2000-12-18, zcatalog 2.2.0 and some
selfwritten stuff....

does anybody have an idea what goes wrong here?

regards, rob.


------------------------------------------------------------
 Robert Prosenc    web:          http://www.matrixware.at/
                   mail:         r.prosenc@matrixware.at
   Matrixware      phone:        +43(  1)   713 43 06 - 2
                   postal:       Geusaugasse 39
                                 (Ecke Kundmanngasse)
                                 A-1030 Vienna, AUSTRIA
------------------------------------------------------------
while !asleep() sheep++ 
------------------------------------------------------------


------=_NextPart_000_00BF_01C0750D.E5353CF0
Content-Type: application/ms-tnef;
	name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="winmail.dat"

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