[DM] Acqusition free traversal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Wishlist
|
Andreas Jung |
Bug Description
2. Introduction
As everybody who has worked with acquisition knows, acquisition can cause undesired and sometimes surprising effects.
Our experience with such an undesired effect comes from an optimized QueueCatalog. Requests to this QueueCatalog consist of a pair path and a set of indexes -- with the meaning: update indexes for the given path. Unindex requests are represented by path and None, as the QueueCatalog can easily determine whether the object corresponding to the path still exists (it is a reindex request) or no longer exists (it is an unindex). unrestrictedTra
The QueueCatalog use case is only one of a large class of use cases: acquisition is unwanted whenever one knows that the traversal argument is derived from a physical path. This usually is true for catalogs.
Suppressing acquisition whenever it is known that acquisition should not be necessary, leads to more robust solutions. Therefore, acquisition control should directly be supported by the ITraversable interface.
3. Feature
Extend the OFS.ITraversable interface such that unrestrictedTra
In order to inform traversal hooks whether acquisition is unwanted, the implementation in OFS.Traversable puts a TraversalReques
4. Example Use Cases
*
Let our QueueCatalog work reliably
*
Let the ZCatalog updateCatalog be able to remove ghost doublicates
o created through copying an object containing the catalog.
* Enable robust solutions whenever traversal parameters are known
o to be derived from physical paths or relative physical paths.
5. Notes
* It is unlikely that the proposal will be accepted -- as
o
the ITraversable interface extension will break all its implementations apart from OFS.Traversable
Changed in zope2: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
'noaq' is a horrible name.
I'm +1 on this change but only if the parameter is changed to be 'acquire', ie:
obj.restrictedT raverse( path,acquire= True) # the default raverse( path,acquire= False) # no acquisiton
obj.restrictedT