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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
eae0f211
Commit
eae0f211
authored
Apr 22, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
735149be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
wcfs/wcfs.go
wcfs/wcfs.go
+1
-1
wcfs/δftail.go
wcfs/δftail.go
+8
-6
No files found.
wcfs/wcfs.go
View file @
eae0f211
...
...
@@ -813,7 +813,7 @@ retry:
// find out which files need to be invalidated due to index change
// XXX no indexMu lock needed because head is Locked
//fmt.Printf("\nbtreeChangev: %v\n", btreeChangev)
δF
:=
bfdir
.
δFtail
.
Update
(
δZ
)
δF
:=
bfdir
.
δFtail
.
Update
(
δZ
,
zhead
)
//fmt.Printf("xfiles: %v\n", xfiles)
for
file
,
δfile
:=
range
δF
.
Change
{
finv
,
ok
:=
toinvalidate
[
file
]
...
...
wcfs/δftail.go
View file @
eae0f211
...
...
@@ -162,7 +162,11 @@ func (δFtail *ΔFtail) Track(file *BigFile, blk int64, path []btree.LONode, zbl
// It returns change in files space that corresponds to δZ.
//
// δZ should include all objects changed by ZODB transaction.
func
(
δFtail
*
ΔFtail
)
Update
(
δZ
*
zodb
.
EventCommit
)
ΔF
{
//
// Zhead must be active connection at δFtail.Head() database state.
// Objects in Zhead must not be modified.
// During call to Update zhead must not be otherwise used - even for reading.
func
(
δFtail
*
ΔFtail
)
Update
(
δZ
*
zodb
.
EventCommit
,
zhead
*
ZConn
)
ΔF
{
δB
:=
δFtail
.
δBtail
.
Update
(
δZ
)
δF
:=
ΔF
{
Rev
:
δB
.
Rev
,
Change
:
make
(
map
[
*
BigFile
]
SetI64
)}
...
...
@@ -189,8 +193,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
// take zblk changes into account
for
_
,
oid
:=
range
δZ
.
Changev
{
// XXX cache lock/unlock
var
zcache
*
zodb
.
LiveCache
// XXX stub
obj
:=
zcache
.
Get
(
oid
)
obj
:=
zhead
.
Cache
()
.
Get
(
oid
)
if
obj
==
nil
{
//fmt.Printf("%s: not in cache\n", oid)
continue
// nothing to do - see invariant
...
...
@@ -199,9 +202,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
//fmt.Printf("%s: in cache (%s)\n", oid, typeOf(obj))
switch
obj
:=
obj
.
(
type
)
{
default
:
continue
// object not related to any bigfile
case
zBlk
:
// ZBlk*
// z.infile locking: since we write-locked head.zconnMu
// - no other fuse reads are running, and thus no one
...
...
@@ -217,6 +217,8 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
δfile
.
Update
(
blocks
)
}
// XXX update z.infile according to btree changes
case
*
ZBigFile
:
// XXX check that .blksize and .blktab (it is only
// persistent reference) do not change.
...
...
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