Commit f046f723 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0d1ab0ea
...@@ -757,13 +757,13 @@ Connection.open = Connection_open ...@@ -757,13 +757,13 @@ Connection.open = Connection_open
@implementer(ISynchronizer) @implementer(ISynchronizer)
class _ZBigFileH(object): class _ZBigFileH(object):
# .zfile ZBigFile we were opened for # .zfile ZBigFile we were opened for
# .wcfileh handle for ZBigFile@zconn.at view in wcfs | None # # .wcfileh handle for ZBigFile@zconn.at view in wcfs | None
# .zfileh handle for ZBigFile in virtmem (overlayed over .wcfileh if .wcfileh != ø) # .zfileh handle for ZBigFile in virtmem (overlayed over .wcfileh if .wcfileh != ø)
def __init__(self, zfile, wcfileh): def __init__(self, zfile, wcfileh):
self.zfile = zfile self.zfile = zfile
self.wcfileh = wcfileh self.wcfileh = wcfileh
self.zfileh = zfile._v_file.fileh_open() # XXX pass wcfileh in self.zfileh = zfile._v_file.fileh_open(wcfileh) # XXX pass wcfileh in
# FIXME zfile._p_jar could be None (ex. ZBigFile is newly created # FIXME zfile._p_jar could be None (ex. ZBigFile is newly created
# before first commit) # before first commit)
...@@ -788,6 +788,8 @@ class _ZBigFileH(object): ...@@ -788,6 +788,8 @@ class _ZBigFileH(object):
# it on every open. # it on every open.
self.zfile._p_jar.onCloseCallback(self.on_connection_close) self.zfile._p_jar.onCloseCallback(self.on_connection_close)
# XXX resync wconn/wcfileh ?
# attach us to Connection's transaction manager: # attach us to Connection's transaction manager:
# #
# Hook into txn_manager so that we get a chance to run before # Hook into txn_manager so that we get a chance to run before
...@@ -816,6 +818,8 @@ class _ZBigFileH(object): ...@@ -816,6 +818,8 @@ class _ZBigFileH(object):
# NOTE open callbacks are setup once and fire on every open - we don't # NOTE open callbacks are setup once and fire on every open - we don't
# need to resetup them here. # need to resetup them here.
# XXX close wcfileh?
# ~~~~ BigFileH wrapper ~~~~ # ~~~~ BigFileH wrapper ~~~~
def mmap(self, pgoffset, pglen): return self.zfileh.mmap(pgoffset, pglen) def mmap(self, pgoffset, pglen): return self.zfileh.mmap(pgoffset, pglen)
......
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