Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
428eb133
Commit
428eb133
authored
Nov 20, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
467c573c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
go/zodb/buffer.go
go/zodb/buffer.go
+1
-1
go/zodb/open.go
go/zodb/open.go
+2
-2
go/zodb/zodbtools/catobj.go
go/zodb/zodbtools/catobj.go
+5
-2
No files found.
go/zodb/buffer.go
View file @
428eb133
...
...
@@ -27,7 +27,7 @@ import (
"lab.nexedi.com/kirr/go123/xmath"
)
// Buf
represents
memory buffer.
// Buf
is reference-counted
memory buffer.
//
// To lower pressure on Go garbage-collector allocate buffers with BufAlloc and
// free them with Buf.Release.
...
...
go/zodb/open.go
View file @
428eb133
...
...
@@ -18,7 +18,7 @@
// See https://www.nexedi.com/licensing for rationale and options.
package
zodb
//
logic to
open storages by URL
// open storages by URL
import
(
"context"
...
...
@@ -55,7 +55,7 @@ func RegisterStorage(scheme string, opener StorageOpener) {
//
// Storage authors should register their storages with RegisterStorage.
//
// TODO automatically wrap
a
storage with Cache.
// TODO automatically wrap
opened
storage with Cache.
func
OpenStorage
(
ctx
context
.
Context
,
storageURL
string
,
opt
*
OpenOptions
)
(
IStorage
,
error
)
{
// no scheme -> file://
if
!
strings
.
Contains
(
storageURL
,
"://"
)
{
...
...
go/zodb/zodbtools/catobj.go
View file @
428eb133
...
...
@@ -43,7 +43,10 @@ func Catobj(ctx context.Context, w io.Writer, stor zodb.IStorage, xid zodb.Xid)
_
,
err
=
w
.
Write
(
buf
.
Data
)
// NOTE deleted data are returned as err by Load
buf
.
Release
()
return
err
// XXX err ctx ?
if
err
!=
nil
{
err
=
fmt
.
Errorf
(
"%s: catobj %s: %s"
,
stor
.
URL
(),
xid
,
err
)
}
return
err
}
// Dumpobj dumps content of one ZODB object with zodbdump-like header
...
...
@@ -55,7 +58,7 @@ func Dumpobj(ctx context.Context, w io.Writer, stor zodb.IStorage, xid zodb.Xid,
return
err
}
// XXX hack - TODO rework IStorage.Load to fill-in objInfo directly
// XXX hack - TODO rework IStorage.Load to fill-in objInfo directly
?
objInfo
.
Oid
=
xid
.
Oid
objInfo
.
Tid
=
tid
objInfo
.
Data
=
buf
.
Data
...
...
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