Re: [dev] RFC IMVCCStorage everywhere (Move ZODB's MVCC to storage layer)

Julien Muchembled <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <[email protected]>
Hello Jim,

I see you'd like not to delay the release of ZODB5. I have started to read the adapter code more carefully. I wish I had more time to do that earlier.

Since ZODB5 is a major release because it is more strict on what loadBefore/sync/lastTransaction must do, it could be a good idea to do other backward incompatible changes.

1. MVCCAdapter

I'm not enthusiast with so many lines of glue code and extra function calls.
I would understand this way of implementing things if you'd like not to break existing code but we're already discussing of a major release.

I'd rather merge IMVCCStorage into IStorage, and for ZODB implementations that don't implement IMVCCStorage, let them inherit a mixin (a mix of MVCCAdapter and MVCCAdapterInstance), the same way as it is done for ConflictResolvingStorage. I think registerDB() would also disappear.

I think the result would be simpler, and ZODB implementations would have more freedom to tweak parts.

2. IStorage.lastOID() ?

We'd use it to migrate databases to NEO. Currently, we hack by calling new_oid(), without actually modifying the DB, which prevent us from opening a ZODB in read-only.

I know you suggested a different way to implement transparent migration, but the memory cost is in O(number of oids) and it is quite a lot of non-trivial changes in NEO whereas the current implementation has already been well-tested.

In ZODB, this would very little change, which I'm ready to do. Same for RelStorage (3 simple methods in adapters + 1 relstorage.py). For ZEO, a new simple rpc is needed.

3. deprecated stuff

- getting rid off versions was already mentionned in PR 66, I'm ok with your answer
- what about dropping the tpc_vote monkey-patch in DB.__init__ ?
similarly in Connection.tpc_vote, there's a "try ... except" on _storage.tpc_vote
- in Connection._store_objects, there's a TODO:deprecate then remove
- DB._storage
- IStorageDB/IStorageWrapper ?

Regards,
Julien

-- 
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.