remove sub folder w/ site-manager, but removed folder's "++etc++site" stay in Data.fs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Won't Fix
|
Undecided
|
Unassigned | ||
zope.app.component |
New
|
Undecided
|
Unassigned |
Bug Description
Data.fs keep reference to removed "++etc++site" object.
Therefore, Data.fs could become huge.
Sample steps:
- Add a folder as 'foo'
- Make a site by 'foo'
- Remove 'foo'
- Still exist /foo/++etc++site object in Data.fs (but it is not traversable)
DocTest like:
>>> from ZODB.serialize import referencesf
>>> def analyze(root_obj):
... conn = root_obj._p_jar
... l_in = [root_obj]
... l_out = []
... while l_in:
... obj = l_in.pop(0)
... p, serial = conn._storage.
... oids = referencesf(p)
... objs = [conn._
... l_out.append(obj)
... l_in.extend([x for x in objs if x not in l_out and x not in l_in])
... return l_out
...
>>> import transaction
>>> from zope.app.
>>> from zope.app.
>>> from zope.app.
>>> f = Folder()
>>> root['foo'] = f
>>> transaction.
>>> objs = analyze(root)
>>> len([x for x in objs if getattr(
1
>>> f = root['foo']
>>> f.setSiteManage
>>> transaction.
>>> objs = analyze(root)
>>> len([x for x in objs if getattr(
2
>>> del root['foo']
>>> del f
>>> transaction.
>>> objs = analyze(root)
>>> len([x for x in objs if getattr(
2
Expected return value (last line) was 1, but 2.
Changed in zope3: | |
status: | New → Won't Fix |