Commit a20f81e1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 090ce48d
......@@ -413,10 +413,8 @@ type Root struct {
zstor zodb.IStorage
// ZODB DB handle for zstor.
// keeps cache of connections for both head/ and @<rev>/ accesses.
// XXX head won't be kept here and will be .Resync()'ed explicitly?
//
// only one connection is used for head/ and only one for each @<rev>.
// keeps cache of connections for @<rev>/ accesses.
// only one connection is used for for each @<rev>.
zdb *zodb.DB
// directory + ZODB connection for head/
......
......@@ -121,29 +121,6 @@ def test_join_autostart():
assert os.path.isdir(wc.mountpoint + "/head/bigfile")
"""
# XXX hack -> kill (?) or read-wait on head/at
# Conn._sync makes sure that underlying wcfs is synced to last ZODB data
@method(wcfs.Conn)
def _sync(self):
print >>sys.stderr, "\n# >>> wcfs.Conn.sync"
zurl = readfile(self.mountpoint + "/.wcfs/zurl")
bigfilev = os.listdir(self.mountpoint + "/head/bigfile")
self.close()
subprocess.check_call(["fusermount", "-u", self.mountpoint])
c2 = wcfs.join(zurl, autostart=True)
assert c2.mountpoint == self.mountpoint
self._fwcfs = c2._fwcfs
# recreate bigfile entries
for bf in bigfilev:
os.stat("%s/head/bigfile/%s" % (self.mountpoint, bf))
print >>sys.stderr, "# <<< wcfs.Conn.sync\n"
"""
# XXX parametrize zblk0, zblk1
# XXX select !wcfs mode so that we prepare data through !wcfs path.
@func
......@@ -210,8 +187,6 @@ def test_wcfs():
# path to f under wcfs
fpath = "%s/%s" % (bigpath, h(f._p_oid))
print
print fpath
st = os.stat(fpath)
assert st.st_size == 0
......@@ -220,10 +195,6 @@ def test_wcfs():
# head/at = last txn of whole db
assert readfile(head + "/at") == h(tid2)
return
# TODO check head/at syncs to later non-bigfile commits
# commit data to f and make sure we can see it on wcfs
#hole = 10 XXX reenable
......@@ -234,9 +205,7 @@ def test_wcfs():
memcpy(vma, s)
commit()
# sync wcfs to ZODB
wc._sync()
wcsync() # sync wcfs to ZODB
# we wrote "hello world" after hole'th block, but size is always mutiple of blksize.
fsize = (hole + 1)*blksize
......@@ -267,8 +236,7 @@ def test_wcfs():
memcpy(vma2,s2)
commit()
wc._sync()
wcsync()
fsize1 = fsize
fsize = fsize1 + blksize # we added one more block
......
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