Commit 721d56d4 authored by Barry Warsaw's avatar Barry Warsaw

_vote(): Actually, this behavior is shared by both Full and Minimal

storages, so it makes sense to move it from there to the base
class.  _vote() now puts the CommitLog into the promised() state.
parent a4e47054
......@@ -25,7 +25,7 @@ from bsddb3 import db
from ZODB import POSException
from ZODB.BaseStorage import BaseStorage
# $Revision: 1.4 $
# $Revision: 1.5 $
__version__ = '0.1'
......@@ -148,6 +148,11 @@ class BerkeleyBase(BaseStorage):
# TBD: this is expensive to calculate and many not be necessary.
return 0
def _vote(self):
# Make a promise to commit all the registered changes. Rewind and put
# our commit log in the PROMISED state.
self._commitlog.promise()
def _finish(self, tid, user, desc, ext):
"""Called from BaseStorage.tpc_finish(), this commits the underlying
BSDDB transaction.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment