Commit 489dab67 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a1ed5085
......@@ -156,6 +156,11 @@ func (stor *Storage) Run(ctx context.Context, l xnet.Listener) (err error) {
serveCancel()
wg.Wait()
err2 := stor.back.Close()
if err == nil {
err = err2
}
return err // XXX err ctx
}
......
......@@ -56,6 +56,9 @@ func Open(ctx context.Context, path string) (*Backend, error) {
return &Backend{zstor: zstor}, nil
}
func (f *Backend) Close() error {
return f.zstor.Close()
}
func (f *Backend) LastTid(ctx context.Context) (zodb.Tid, error) {
return f.zstor.Sync(ctx)
......
......@@ -47,6 +47,8 @@ type Backend interface {
// Load, similarly to zodb.IStorageDriver.Load should load object data addressed by xid.
Load(ctx context.Context, xid zodb.Xid) (*proto.AnswerObject, error)
Close() error
}
// BackendOpener is a function to open a NEO storage backend
......
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