Commit ca4bec69 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3765bd53
......@@ -740,18 +740,6 @@ retry:
zhead := head.zconn
bfdir := head.bfdir
/*
// fileInvalidate describes invalidations for one file
type fileInvalidate struct {
blkmap SetI64 // changed blocks
size bool // whether to invalidate file size
}
toinvalidate := map[*BigFile]*fileInvalidate{} // {} file -> set(#blk), sizeChanged
*/
// btreeChangev := []zodb.Oid{} // oids changing BTree|Bucket
//fmt.Printf("\n\n\n")
/*
// δZ = (tid↑, []oid)
for _, oid := range δZ.Changev {
......@@ -812,35 +800,16 @@ retry:
}
*/
// find out which files need to be invalidated due to index change
// invalidate kernel cache for date in changed files
// XXX no indexMu lock needed because head is Locked
//fmt.Printf("\nbtreeChangev: %v\n", btreeChangev)
δF := bfdir.δFtail.Update(δZ, zhead)
//fmt.Printf("xfiles: %v\n", xfiles)
/*
for file, δfile := range δF.Change {
finv, ok := toinvalidate[file]
if !ok {
finv = &fileInvalidate{} // XXX init blkmap?
toinvalidate[file] = finv
}
// XXX use δfile blocks -> finv.blkmap
// TODO invalidate .size only if key >= maxkey was changed
finv.size = true
finv.blkmap = δfile // XXX copy?
file.δtail.Append(δF.Rev, δfile.Blocks.Elements())
}
*/
//fmt.Printf("\n\nzδhandle: toinvalidate (#%d):\n", len(toinvalidate))
//for file := range toinvalidate {
//fmt.Printf("\n\nzδhandle: δF (#%d):\n", len(δF))
//for file := range δF {
// fmt.Printf("\t- %s\n", file.zfile.POid())
//}
wg, ctx := errgroup.WithContext(context.TODO()) // XXX ctx = ?
// for file, finv := range toinvalidate {
for file, δfile := range δF.Change {
file := file
for blk := range δfile.Blocks {
......
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