Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
ca4bec69
Commit
ca4bec69
authored
Apr 22, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3765bd53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
34 deletions
+3
-34
wcfs/wcfs.go
wcfs/wcfs.go
+3
-34
No files found.
wcfs/wcfs.go
View file @
ca4bec69
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment