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
096d7eb0
Commit
096d7eb0
authored
Mar 31, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a4b30e86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
41 deletions
+40
-41
wcfs/wcfs.go
wcfs/wcfs.go
+40
-41
No files found.
wcfs/wcfs.go
View file @
096d7eb0
...
...
@@ -475,45 +475,8 @@ type Head struct {
// head/watch opens
// XXX protected by ... head.zconnMu ?
watchTab
map
[
*
Watcher
]
struct
{}
}
// /head/watch - served by Watch.
type
Watch
struct
{
fsNode
head
*
Head
// parent head/
idNext
int32
// ID for next opened Watcher
}
// /head/watch handle - served by Watcher.
type
Watcher
struct
{
sk
*
FileSock
// IO channel to client
id
int32
// ID of this /head/watch handle (for debug log)
head
*
Head
// established file watchers.
// XXX in-progress - where? -> nowhere; here only established watches are added
// XXX locking?
// XXX -> {} foid -> FileWatch
fileTab
map
[
*
FileWatch
]
struct
{}
// IO
// acceptq chan string // (stream, msg) // client-initiated messages go here
rxMu
sync
.
Mutex
rxTab
map
[
uint64
]
chan
string
// client replies go via here
}
// FileWatch represents watching for 1 BigFile.
// XXX merge into watcher?
type
FileWatch
struct
{
link
*
Watcher
// link to client
file
*
BigFile
// XXX needed?
// XXX locking
at
zodb
.
Tid
// requested to be watched @at
pinned
SetI64
// blocks that are already pinned to be ≤ at
// XXX -> watchTab?
wlinkTab
map
[
*
WatchLink
]
struct
{}
}
// /(head|<rev>)/bigfile/ - served by BigFileDir.
...
...
@@ -560,10 +523,10 @@ type BigFile struct {
loadMu
sync
.
Mutex
loading
map
[
int64
]
*
blkLoadState
// #blk -> {... blkdata}
// watche
r
s attached to this file
// watches attached to this file
// XXX already in "established" state (i.e. initial watch request was answered with "ok")
// XXX locking -> watchMu?
watche
rs
map
[
*
File
Watch
]
struct
{}
watche
s
map
[
*
Watch
]
struct
{}
}
// blkLoadState represents a ZBlk load state/result.
...
...
@@ -577,6 +540,42 @@ type blkLoadState struct {
err
error
}
// /head/watch - represented by WatchNode.
type
WatchNode
struct
{
fsNode
head
*
Head
// parent head/
idNext
int32
// ID for next opened WatchLink
}
// /head/watch handle - represented by WatchLink.
type
WatchLink
struct
{
sk
*
FileSock
// IO channel to client
id
int32
// ID of this /head/watch handle (for debug log)
head
*
Head
// established watchs.
// XXX in-progress - where? -> nowhere; here only established watches are added
// XXX locking?
watchTab
map
[
zodb
.
Oid
]
*
Watch
// {} foid -> Watch
// IO
// acceptq chan string // (stream, msg) // client-initiated messages go here
rxMu
sync
.
Mutex
rxTab
map
[
uint64
]
chan
string
// client replies go via here
}
// Watch represents watching for changes to 1 BigFile.
type
Watch
struct
{
wlink
*
WatchLink
// link to client
file
*
BigFile
// XXX needed?
// XXX locking
at
zodb
.
Tid
// requested to be watched @at
pinned
SetI64
// blocks that are already pinned to be ≤ at
}
// -------- 3) Cache invariant --------
// zodbCacheControl implements zodb.LiveCacheControl to tune ZODB to never evict
...
...
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