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
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:
...
@@ -813,7 +813,7 @@ retry:
// find out which files need to be invalidated due to index change
// find out which files need to be invalidated due to index change
// XXX no indexMu lock needed because head is Locked
// XXX no indexMu lock needed because head is Locked
//fmt.Printf("\nbtreeChangev: %v\n", btreeChangev)
//fmt.Printf("\nbtreeChangev: %v\n", btreeChangev)
δF
:=
bfdir
.
δFtail
.
Update
(
δZ
)
δF
:=
bfdir
.
δFtail
.
Update
(
δZ
,
zhead
)
//fmt.Printf("xfiles: %v\n", xfiles)
//fmt.Printf("xfiles: %v\n", xfiles)
for
file
,
δfile
:=
range
δF
.
Change
{
for
file
,
δfile
:=
range
δF
.
Change
{
finv
,
ok
:=
toinvalidate
[
file
]
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
...
@@ -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.
// It returns change in files space that corresponds to δZ.
//
//
// δZ should include all objects changed by ZODB transaction.
// δ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
)
δB
:=
δFtail
.
δBtail
.
Update
(
δZ
)
δF
:=
ΔF
{
Rev
:
δB
.
Rev
,
Change
:
make
(
map
[
*
BigFile
]
SetI64
)}
δF
:=
ΔF
{
Rev
:
δB
.
Rev
,
Change
:
make
(
map
[
*
BigFile
]
SetI64
)}
...
@@ -189,8 +193,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
...
@@ -189,8 +193,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
// take zblk changes into account
// take zblk changes into account
for
_
,
oid
:=
range
δZ
.
Changev
{
for
_
,
oid
:=
range
δZ
.
Changev
{
// XXX cache lock/unlock
// XXX cache lock/unlock
var
zcache
*
zodb
.
LiveCache
// XXX stub
obj
:=
zhead
.
Cache
()
.
Get
(
oid
)
obj
:=
zcache
.
Get
(
oid
)
if
obj
==
nil
{
if
obj
==
nil
{
//fmt.Printf("%s: not in cache\n", oid)
//fmt.Printf("%s: not in cache\n", oid)
continue
// nothing to do - see invariant
continue
// nothing to do - see invariant
...
@@ -199,9 +202,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
...
@@ -199,9 +202,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
//fmt.Printf("%s: in cache (%s)\n", oid, typeOf(obj))
//fmt.Printf("%s: in cache (%s)\n", oid, typeOf(obj))
switch
obj
:=
obj
.
(
type
)
{
switch
obj
:=
obj
.
(
type
)
{
default
:
continue
// object not related to any bigfile
case
zBlk
:
// ZBlk*
case
zBlk
:
// ZBlk*
// z.infile locking: since we write-locked head.zconnMu
// z.infile locking: since we write-locked head.zconnMu
// - no other fuse reads are running, and thus no one
// - no other fuse reads are running, and thus no one
...
@@ -217,6 +217,8 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
...
@@ -217,6 +217,8 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) ΔF {
δfile
.
Update
(
blocks
)
δfile
.
Update
(
blocks
)
}
}
// XXX update z.infile according to btree changes
case
*
ZBigFile
:
case
*
ZBigFile
:
// XXX check that .blksize and .blktab (it is only
// XXX check that .blksize and .blktab (it is only
// persistent reference) do not change.
// 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