Commit 99c7d87c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 58c160f5
......@@ -810,7 +810,8 @@ retry:
// XXX no indexMu lock needed because head is Locked
δF := bfdir.δFtail.Update(δZ, zhead)
fmt.Printf("\n\nzδhandle: δF (#%d):\n", len(δF.ByFile))
if false {
fmt.Printf("\n\nS: zδhandle: δF (#%d):\n", len(δF.ByFile))
for file, δfile := range δF.ByFile {
blkv := δfile.Blocks.Elements()
sort.Slice(blkv, func(i, j int) bool {
......@@ -820,10 +821,10 @@ retry:
if δfile.Size {
size = "S"
}
fmt.Printf("\t- %s\t%s %v\n", file.zfile.POid(), size, blkv)
fmt.Printf("S: \t- %s\t%s %v\n", file.zfile.POid(), size, blkv)
}
//time.Sleep(1*time.Second)
fmt.Printf("\n\n")
}
wg, ctx := errgroup.WithContext(context.TODO()) // XXX ctx = ?
for file, δfile := range δF.ByFile {
......@@ -1486,7 +1487,6 @@ func (wlink *WatchLink) _serveRX() (err error) {
}
e2 := wlink.sk.Close()
fmt.Printf("S: wlink %d: sk.close -> %v\n", wlink.id, e2)
if e == nil {
e = e2
}
......
......@@ -203,7 +203,7 @@ class tDB:
# perform modifications scheduled by change.
# use !wcfs mode so that we prepare data independently of wcfs code paths.
dF = DF()
for zf, zfDelta in t._changed.iteritems():
for zf, zfDelta in t._changed.items():
dfile = DFile()
zfh = zf.fileh_open(_use_wcfs=False)
for blk, data in zfDelta.iteritems():
......@@ -211,9 +211,7 @@ class tDB:
data += b'\0'*(zf.blksize - len(data)) # trailing \0
vma = zfh.mmap(blk, 1)
memcpy(vma, data)
print(' δ f<%s>\t%s' % (h(zf._p_oid), sorted(zfDelta.keys())))
dF.byfile[zf] = dfile
t._changed = {}
# NOTE there is no clean way to retrieve tid of just committed transaction
# we use last._p_serial as workaround.
......@@ -224,7 +222,11 @@ class tDB:
head = last._p_serial
t.head = head
t._headv.append(head)
print('commit -> %s' % t.hat(head))
print('\nM: commit -> %s' % t.hat(head))
for zf, zfDelta in t._changed.items():
print('M: f<%s>\t%s' % (h(zf._p_oid), sorted(zfDelta.keys())))
t._changed = {}
dF.rev = head
for dfile in dF.byfile.values():
......@@ -692,8 +694,8 @@ def test_wcfs():
assert w.sendReq(ctx, b"watch %s @%s" % (h(zf._p_oid), h(at1))) == "ok"
wg.go(_)
wg.wait()
"""
print('\nCCC\n')
"""
bg = context.background()
......
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