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
fdda65cd
Commit
fdda65cd
authored
Jul 08, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c5552417
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+7
-5
wcfs/internal/zdata/δftail_test.go
wcfs/internal/zdata/δftail_test.go
+5
-0
wcfs/wcfs.go
wcfs/wcfs.go
+2
-1
No files found.
wcfs/internal/zdata/δftail.go
View file @
fdda65cd
...
@@ -30,7 +30,7 @@ import (
...
@@ -30,7 +30,7 @@ import (
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/set"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/set"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xtail"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xtail"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb"
//
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb"
)
)
type
setI64
=
set
.
I64
type
setI64
=
set
.
I64
...
@@ -217,10 +217,12 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
...
@@ -217,10 +217,12 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
//
//
// δZ should include all objects changed by ZODB transaction.
// δZ should include all objects changed by ZODB transaction.
//
//
// Zhead must be active connection at δFtail.Head() database state.
// XXX readd zhead?
// Objects in Zhead must not be modified.
// // Zhead must be active connection at δFtail.Head() database state.
// During call to Update zhead must not be otherwise used - even for reading.
// // Objects in Zhead must not be modified.
func
(
δFtail
*
ΔFtail
)
Update
(
δZ
*
zodb
.
EventCommit
,
zhead
*
xzodb
.
ZConn
)
(
_
ΔF
,
err
error
)
{
// // During call to Update zhead must not be otherwise used - even for reading.
//func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit, zhead *xzodb.ZConn) (_ ΔF, err error) {
func
(
δFtail
*
ΔFtail
)
Update
(
δZ
*
zodb
.
EventCommit
)
(
_
ΔF
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"ΔFtail update %s -> %s"
,
δFtail
.
Head
(),
δZ
.
Tid
)
defer
xerr
.
Contextf
(
&
err
,
"ΔFtail update %s -> %s"
,
δFtail
.
Head
(),
δZ
.
Tid
)
// XXX δFtail.update() first?
// XXX δFtail.update() first?
...
...
wcfs/internal/zdata/δftail_test.go
View file @
fdda65cd
...
@@ -162,9 +162,14 @@ func TestΔFtail(t_ *testing.T) {
...
@@ -162,9 +162,14 @@ func TestΔFtail(t_ *testing.T) {
// commit updated blkTab + dataTab
// commit updated blkTab + dataTab
tdTxt
:=
fmt
.
Sprintf
(
"t%s D%s"
,
xbtreetest
.
KVTxt
(
blkTab
),
dataTabTxt
(
dataTab
))
tdTxt
:=
fmt
.
Sprintf
(
"t%s D%s"
,
xbtreetest
.
KVTxt
(
blkTab
),
dataTabTxt
(
dataTab
))
commit
:=
t
.
CommitTree
(
tdTxt
)
commit
:=
t
.
CommitTree
(
tdTxt
)
fmt
.
Printf
(
"@%s δT: %v δD: %s
\n
"
,
commit
.
At
,
test
.
δblkTab
,
test
.
δdataTab
)
fmt
.
Printf
(
"@%s %s
\n
"
,
commit
.
At
,
commit
.
Tree
)
fmt
.
Printf
(
"@%s %s
\n
"
,
commit
.
At
,
commit
.
Tree
)
// update δftail
δF
,
err
:=
δftail
.
Update
(
commit
.
ΔZ
);
X
(
err
)
// XXX assert
// XXX assert
_
=
δF
}
}
}
}
...
...
wcfs/wcfs.go
View file @
fdda65cd
...
@@ -868,7 +868,8 @@ retry:
...
@@ -868,7 +868,8 @@ retry:
// invalidate kernel cache for data in changed files
// invalidate kernel cache for data in changed files
// NOTE no δFmu lock needed because zhead is WLocked
// NOTE no δFmu lock needed because zhead is WLocked
δF
,
err
:=
bfdir
.
δFtail
.
Update
(
δZ
,
zhead
)
// δF <- δZ |tracked
// δF, err := bfdir.δFtail.Update(δZ, zhead) // δF <- δZ |tracked
δF
,
err
:=
bfdir
.
δFtail
.
Update
(
δZ
)
// δF <- δZ |tracked
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
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