Commit 5b7777bd authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6e757371
......@@ -519,6 +519,15 @@ func (cc *zodbCacheControl) WantEvict(obj zodb.IPersistent) bool {
// ZBlk* are kept referenced by a LOBucket, so they don't go away from Connection.cache.objtab
// FIXME we need to keep ZBigFile in cache: even if we keep a pointer
// to ZBigFile, but it is allowed to drop its state, it will release
// pointer to LOBTree object and, consequently, that LOBTree object,
// even if it was marked not to be released from cache will be GC'ed by
// go runtime, and the cache will loose its weak reference to it.
// XXX however we cannot protect ZBigFile from releaseing state - as
// any object can be explicitly invalidated.
// FIXME -> teach zodb.LiveCache to keep object by itself?
//
// we also keep ZBigFile alive because we want to make sure .blksize
// and (p. ref) .blktab do not change.
// XXX do we really need to keep ZBigFile alive for that?
......@@ -816,6 +825,8 @@ func (bfdir *BigFileDir) lookup(out *fuse.Attr, name string, fctx *fuse.Context)
//
// it is not an error if @<rev>/ already exists - mkdir succeeds and EEXIST is not returned.
// in other words mkdir behaves here similarly to `mkdir -p`.
//
// XXX -> remove mkdir and just create @revX/ on lookup.
func (root *Root) Mkdir(name string, mode uint32, fctx *fuse.Context) (*nodefs.Inode, fuse.Status) {
inode, err := root.mkdir(name, fctx) // XXX ok to ignore mode?
return inode, err2LogStatus(err)
......@@ -1229,8 +1240,6 @@ func main() {
ctx := context.Background() // XXX + timeout?
zstor, err := zodb.OpenStorage(ctx, zurl, &zodb.OpenOptions{
ReadOnly: true,
// FIXME zodb.Cache is not ready for watching and we don't use .Prefetch()
NoCache: true,
})
if err != nil {
log.Fatal(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment