Commit e7cc46b7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent de596547
...@@ -429,6 +429,7 @@ import ( ...@@ -429,6 +429,7 @@ import (
"sync" "sync"
"sync/atomic" "sync/atomic"
"syscall" "syscall"
"time"
log "github.com/golang/glog" log "github.com/golang/glog"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
...@@ -804,10 +805,12 @@ retry: ...@@ -804,10 +805,12 @@ retry:
// XXX no indexMu lock needed because head is Locked // XXX no indexMu lock needed because head is Locked
δF := bfdir.δFtail.Update(δZ, zhead) δF := bfdir.δFtail.Update(δZ, zhead)
//fmt.Printf("\n\nzδhandle: δF (#%d):\n", len(δF)) fmt.Printf("\n\nzδhandle: δF (#%d):\n", len(δF.Change))
//for file := range δF { for file := range δF.Change {
// fmt.Printf("\t- %s\n", file.zfile.POid()) fmt.Printf("\t- %s\n", file.zfile.POid())
//} }
time.Sleep(1*time.Second)
fmt.Printf("\n\n")
wg, ctx := errgroup.WithContext(context.TODO()) // XXX ctx = ? wg, ctx := errgroup.WithContext(context.TODO()) // XXX ctx = ?
for file, δfile := range δF.Change { for file, δfile := range δF.Change {
...@@ -1394,6 +1397,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T ...@@ -1394,6 +1397,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
for blk, rev := range toPin { for blk, rev := range toPin {
blk := blk blk := blk
rev := rev rev := rev
fmt.Printf("S: watch: -> pin #%d @%s\n", blk, rev)
wg.Go(func() error { wg.Go(func() error {
return w.pin(ctx, blk, rev) return w.pin(ctx, blk, rev)
}) })
......
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