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
81b5056a
Commit
81b5056a
authored
Apr 22, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b311b5e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
wcfs/wcfs.go
wcfs/wcfs.go
+3
-2
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+6
-1
No files found.
wcfs/wcfs.go
View file @
81b5056a
...
...
@@ -430,7 +430,7 @@ import (
"sync"
"sync/atomic"
"syscall"
"time"
//
"time"
log
"github.com/golang/glog"
"golang.org/x/sync/errgroup"
...
...
@@ -818,12 +818,13 @@ retry:
}
fmt
.
Printf
(
"
\t
- %s
\t
%s %v
\n
"
,
file
.
zfile
.
POid
(),
size
,
blkv
)
}
time
.
Sleep
(
1
*
time
.
Second
)
//
time.Sleep(1*time.Second)
fmt
.
Printf
(
"
\n\n
"
)
wg
,
ctx
:=
errgroup
.
WithContext
(
context
.
TODO
())
// XXX ctx = ?
for
file
,
δfile
:=
range
δF
.
Change
{
// XXX needed?
// XXX even though δBtail is complete, not all ZBlk are present here
file
.
δtail
.
Append
(
δF
.
Rev
,
δfile
.
Blocks
.
Elements
())
file
:=
file
...
...
wcfs/wcfs_test.py
View file @
81b5056a
...
...
@@ -543,11 +543,14 @@ def test_wcfs():
f
.
assertCache
([
0
,
0
,
0
])
# initially not cached
f
.
assertData
([
b''
,
b''
,
b'alpha'
],
mtime
=
t
.
head
)
print
(
'000'
)
# >>> (@at2) commit again -> we can see both latest and snapshotted states
t
.
change
(
zf
,
{
2
:
b'beta'
,
3
:
b'gamma'
})
at2
=
t
.
commit
()
t
.
wcsync
()
print
(
'111'
)
# f @head
f
.
assertCache
([
1
,
1
,
0
,
0
])
...
...
@@ -560,11 +563,13 @@ def test_wcfs():
# >>> (@at3) commit again without changing zf size
print
(
'222'
)
f2
=
t
.
open
(
zf
,
at
=
at2
)
t
.
change
(
zf
,
{
2
:
b'kitty'
})
at3
=
t
.
commit
()
t
.
wcsync
()
print
(
'333'
)
f
.
assertCache
([
1
,
1
,
0
,
1
])
# f @head is opened again -> cache must not be lost
...
...
@@ -597,7 +602,7 @@ def test_wcfs():
# >>> XXX commit data to not yet accessed f part - nothing happens
# XXX invalidation protocol ...
print
(
'
\
n
\
n
'
)
print
(
'
\
n
\
n
inv. protocol
\
n
\
n
'
)
w
=
t
.
openwatch
()
done
=
chan
()
...
...
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