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]>
Ahhh tpc_finish !

Before today, I only tested NEO on the no-more-load branch before the adapters were merged. I have errors again. Some because tests do 'connection._storage.iterator', which I changed into 'connection.db().storage.iterator'

But what annoys me is the monkey-patch we have for tpc_finish, which would become more complicated, mainly because of missing 'return' in adapters[1], but also because Connection.tpc_finish differs between ZODB5 and older versions[2].

I thought I could leave this subject aside for ZODB5, but instead of wasting time inside NEO, I should rather work on pushing this ZODB before anything else.

Hmm... not sure everyone remembers exactly what I am talking about. The monkey-patch was sent long time ago on this mailing-list (early 2012). So, in NEO, we don't want to serialize of the second phase of 2PC, which means:
- the real tid is only known during tpc_finish
- before tpc_finish, NEO works with a temporary tid
- NEOStorage.tpc_vote only returns oids for which a conflict happened
- NEOSTorage.tpc_finish returns the committed tid
- and what tpc_vote usually does for other ZODB implementation has to be done at the end of Connection.tpc_finish

You can find the monkey-patch at
  https://lab.nexedi.com/nexedi/neoppod/blob/v1.6.3/neo/client/__init__.py#L35

https://lab.nexedi.com/nexedi/neoppod/blob/v1.6.3/ZODB.patch
contains other changes:
- update of IStorage.tpc_finish doc string
- update of existing unit tests

TODO:
- 2 lines are removed in tpc_vote, instead of being reworded
- write a new ZODB test to check this feature
- it's been a long time since the whole ZODB test suite was run with this patch

Julien

[1] Actually, I noticed the them after I updated neo/client/__init__.py for [2]. So I patched ZODB locally, and the whole NEO test suite passes.

-- 
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.