Re: Migrating to BTrees 4.x
Hanno Schlichting <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <1483639988.1463036.838499041.20CA63F7@webmail.messagingengine.com> |
On Thu, Jan 5, 2017, at 19:01, Jim Fulton wrote: > But surely people have built apps with BTrees 4, because BTrees 4 was > released a loooooooong time ago (late 2012), and this seatbelt was > introduced in BTrees 4.0. > > When indexing content, you will very often encounter content without a > value set, typically defaulting to None. > > When such values are indexed, you'll get an error. I don't see any > guard against this error in, for example, zope.index. > > Have people built newer apps with indexing on BTrees 4? If so, how > have you dealt with this issue? I've encountered this when working on Products.ZCatalog back in 2014. At first I passed on the TypeError, and reraised it to get a more application specific error message (https://github.com/zopefoundation/Products.ZCatalog/commit/c378cdab2fb8997af1a17261458a1528e7131243) . Later on this was deemed to be too cumbersome, so in mid-2016 I've changed this to simply ignore any call that tried to put None values into a ZCatalog Unindex (https://github.com/zopefoundation/Products.ZCatalog/commit/1b078be1e336998f87ecdfbfd04944ebc33d0af7) . Neither ZCatalog nor Zope2 have data migration frameworks, so migrations of existing database is left to each application. I case of Plone, there is a migration framework and while working on that, David ran into this problem. There's probably a Plone version being released that uses BTrees 4+ and ZCatalog 3.1+ later this or next year. I think this is all pretty much as expected, as the main feature everyone wants from a new Zope2 version is Python 3 compatibility and that is only very slowing making its way through the stack. Hanno -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.