[ZODB-Dev] self.length._p_deactivate() and MVCC

Thomas Güttler hv at tbz-pariv.de
Fri Apr 30 04:03:09 EDT 2004


By chance I came across this comment
in the code of Lexicon.py of ZCTextIndex.py:

    def sourceToWordIds(self, text):
        last = _text2list(text)
        for element in self._pipeline:
            last = element.process(last)
        if not hasattr(self.length, 'change'):
            # Make sure length is overridden with a BTrees.Length.Length
            self.length = Length(self.length())        
        # Strategically unload the length value so that we get the most
        # recent value written to the database to minimize conflicting wids
        # XXX this will not work when MVCC is implemented in the ZODB...
        self.length._p_deactivate() # <------------------------
        return map(self._getWordIdCreate, last)

Can someone explain this, and why this does not work with MVCC?

Thank you,
   Thomas


-- 
Thomas Güttler, TBZ-PARIV GmbH, Bernsdorfer Str. 210-212, 09126 Chemnitz
Tel.: 0371/5221217 Fax:  0371/5221216





More information about the ZODB-Dev mailing list