Commit 08f0e905 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5115f254
......@@ -542,7 +542,7 @@ func traceWatch(format string, argv ...interface{}) {
return
}
log.Infof("zwatcher: " + format, argv...)
log.Infof("zwatcher: " + format, argv...) // XXX InfoDepthf
}
// zwatcher watches for ZODB changes.
......@@ -648,9 +648,16 @@ func (root *Root) zδhandle1(zevent zodb.CommitEvent) {
runtime.KeepAlive(obj)
}
fmt.Printf("\n\nzδhandle: toinvalidate (#%d):\n", len(toinvalidate))
for file := range toinvalidate {
fmt.Printf("\t- %s\n", file.zbf.POid())
}
wg, ctx := errgroup.WithContext(context.TODO())
for file, blkmap := range toinvalidate {
file := file
for blk := range blkmap {
blk := blk
wg.Go(func() error {
return file.invalidateBlk(ctx, blk)
})
......@@ -658,7 +665,9 @@ func (root *Root) zδhandle1(zevent zodb.CommitEvent) {
// invalidate kernel cache for attributes
// XXX we need to do it only if we see topoligy (i.e. btree) change
wg.Go(file.invalidateAttr)
wg.Go(func() error {
return file.invalidateAttr()
})
}
err := wg.Wait()
if err != nil {
......@@ -753,6 +762,8 @@ func (f *BigFile) invalidateBlk(ctx context.Context, blk int64) error {
// invalidateAttr invalidates file attributes in kernel cache.
func (f *BigFile) invalidateAttr() error {
log.Error("AAA")
fsconn := gfsconn
st := fsconn.FileNotify(f.Inode(), -1, -1) // metadata only
// st != ok
......
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