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
5683c3ca
Commit
5683c3ca
authored
Jul 16, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c5d4e890
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
wcfs/wcfs.go
wcfs/wcfs.go
+17
-0
wcfs/zodb.go
wcfs/zodb.go
+9
-0
No files found.
wcfs/wcfs.go
View file @
5683c3ca
...
...
@@ -457,6 +457,23 @@ func (bf *BigFile) Read(_ nodefs.File, dest []byte, off int64, _ fuse.Context) (
*/
// zodbCacheControl tunes ZODB wrt caching XXX
// XXX set it to Connection.CacheControl
type
zodbCacheControl
struct
{}
type
(
cc
*
zodbCacheControl
)
WantEvict
(
obj
Object
)
{
// we want to keep ZBTree/ZBucket always alive becuse it is essentially
// the index where to find ZBigFile data.
switch
obj
.
(
type
)
{
default
:
return
true
case
*
ZBtree
:
case
*
ZBucket
:
}
return
false
}
// XXX option to prevent starting if wcfs was already started ?
...
...
wcfs/zodb.go
View file @
5683c3ca
...
...
@@ -105,6 +105,15 @@ func (pyobj *pyObject) PyClass() pickle.Class { return pyobj.pyclass }
func
(
pyobj
*
pyObject
)
PyState
()
interface
{}
{
return
pyobj
.
pystate
}
// ConnCacheControl is the interface that allows applications to influence
// Connection decisions with respect to its cache.
type
ConnCacheControl
interface
{
// WantEvict is called when object is going to be evicted from live cache and made ghost.
// If !ok the object will remain live.
WantEvict
(
obj
Object
)
(
ok
bool
)
}
// Connection represents a view of ZODB database.
//
// The view is representing state of ZODB objects as of `at` transaction.
...
...
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