Commit 6c37f3b3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 785acadf
...@@ -40,7 +40,7 @@ type ZBucket struct { ...@@ -40,7 +40,7 @@ type ZBucket struct {
next *ZBucket // the bucket with the next-larger keys next *ZBucket // the bucket with the next-larger keys
keys []KEY // 'len' keys, in increasing order keys []KEY // 'len' keys, in increasing order
values []interface{} // 'len' corresponding values XXX merge k/v ? values []interface{} // 'len' corresponding values
} }
// zBTreeItem mimics BTreeItem from btree/py. // zBTreeItem mimics BTreeItem from btree/py.
......
// Copyright (C) 2018 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// You can also Link and Combine this program with other software covered by
// the terms of any of the Free Software licenses or any of the Open Source
// Initiative approved licenses and Convey the resulting work. Corresponding
// source of such a combination shall include the source code for all other
// software used.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
package main
import (
//"testing"
)
// TODO
...@@ -241,6 +241,12 @@ package main ...@@ -241,6 +241,12 @@ package main
// link above), but better we have proper FUSE flag for filesystem server to // link above), but better we have proper FUSE flag for filesystem server to
// tell the kernel it is fully responsible for invalidating pagecache. // tell the kernel it is fully responsible for invalidating pagecache.
// TODO implementation organization.
// - 1 ZODB connection per 1 bigfile (each bigfile can be at its different @at,
// because invalidations for different bigfiles can be processed with different
// timings depending on clients). No harm here as different bigfiles use
// completely different ZODB BTree and data objects.
import ( import (
"context" "context"
"flag" "flag"
...@@ -361,6 +367,10 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, _ *fuse.Context) (*nodefs ...@@ -361,6 +367,10 @@ func (br *BigFileRoot) Mkdir(name string, mode uint32, _ *fuse.Context) (*nodefs
ctx := context.Background() // XXX ok? ctx := context.Background() // XXX ok?
_ = ctx _ = ctx
return nil, fuse.ENOSYS // XXX temp return nil, fuse.ENOSYS // XXX temp
// xbf, err := zconn.Get(ctx, oid)
// check err
// check if xbf.(*ZBigFile)
/* XXX kill /* XXX kill
buf, _, err := br.zstor.Load(ctx, zodb.Xid{Oid: oid, At: zodb.TidMax}) // FIXME At, use serial buf, _, err := br.zstor.Load(ctx, zodb.Xid{Oid: oid, At: zodb.TidMax}) // FIXME At, use serial
if err != nil { if err != nil {
......
...@@ -23,6 +23,9 @@ import ( ...@@ -23,6 +23,9 @@ import (
) )
// Object is the interface that every in-RAM object representing any ZODB object implements. // Object is the interface that every in-RAM object representing any ZODB object implements.
//
// It is analog to Persistent in ZODB.
// XXX rename -> Persistent?
type Object interface { type Object interface {
PJar() *Connection // Connection this in-RAM object is part of. PJar() *Connection // Connection this in-RAM object is part of.
POid() zodb.Oid // object ID in the database. POid() zodb.Oid // object ID in the database.
......
...@@ -25,6 +25,8 @@ import ( ...@@ -25,6 +25,8 @@ import (
) )
// PyObject is the interface that every in-RAM object representing Python ZODB object implements. // PyObject is the interface that every in-RAM object representing Python ZODB object implements.
//
// XXX rename -> PyPersistent?
type PyObject interface { type PyObject interface {
Object Object
......
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