Commit e06b62e8 authored by Jim Fulton's avatar Jim Fulton

Define _modified at class level

Hopefully, this will make linters happier.
parent 1594dc10
...@@ -146,6 +146,9 @@ class MVCCAdapterInstance(Base): ...@@ -146,6 +146,9 @@ class MVCCAdapterInstance(Base):
raise POSException.ReadConflictError(repr(oid)) raise POSException.ReadConflictError(repr(oid))
return r[:2] return r[:2]
_modified = None # Used to keep track of oids modified within a
# transaction, so we can invalidate them later.
def tpc_begin(self, transaction): def tpc_begin(self, transaction):
self._storage.tpc_begin(transaction) self._storage.tpc_begin(transaction)
self._modified = set() self._modified = set()
...@@ -165,7 +168,7 @@ class MVCCAdapterInstance(Base): ...@@ -165,7 +168,7 @@ class MVCCAdapterInstance(Base):
def invalidate_finish(tid): def invalidate_finish(tid):
self._base._invalidate_finish(self._modified, self) self._base._invalidate_finish(self._modified, self)
func(tid) func(tid)
del self._modified self._modified = None
self._storage.tpc_finish(transaction, invalidate_finish) self._storage.tpc_finish(transaction, invalidate_finish)
......
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