Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
0921f02d
Commit
0921f02d
authored
Feb 23, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
82b85e36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
t/neo/storage/fs1/filestorage_test.go
t/neo/storage/fs1/filestorage_test.go
+6
-1
t/neo/zodb/zodb.go
t/neo/zodb/zodb.go
+2
-4
No files found.
t/neo/storage/fs1/filestorage_test.go
View file @
0921f02d
...
...
@@ -67,17 +67,22 @@ func TestLoad(t *testing.T) {
txh
:=
txe
.
Header
// loadSerial
// TODO also test for getting error when not found
xid
:=
zodb
.
Xid
{
zodb
.
XTid
{
txh
.
Tid
,
false
},
txh
.
Oid
}
checkLoad
(
t
,
fs
,
xid
,
oidLoadedOk
{
txh
.
Tid
,
txe
.
Data
()})
// loadBefore
// TODO also test for getting error when not found
xid
=
zodb
.
Xid
{
zodb
.
XTid
{
txh
.
Tid
,
true
},
txh
.
Oid
}
expect
,
ok
:=
before
[
txh
.
Oid
]
// TODO also test for getting error when !ok
if
ok
{
checkLoad
(
t
,
fs
,
xid
,
expect
)
}
// loadBefore to get current record
xid
.
Tid
+=
1
checkLoad
(
t
,
fs
,
xid
,
oidLoadedOk
{
txh
.
Tid
,
txe
.
Data
()})
before
[
txh
.
Oid
]
=
oidLoadedOk
{
txh
.
Tid
,
txe
.
Data
()}
}
...
...
t/neo/zodb/zodb.go
View file @
0921f02d
...
...
@@ -137,13 +137,11 @@ type IStorage interface {
// XXX ^^^ ok ?
LastTid
()
Tid
// XXX -> Tid, ok ?
// LoadSerial and LoadBefore generalized into 1 Load (see Xid for details)
// TODO data []byte -> something allocated from slab ?
Load
(
xid
Xid
)
(
data
[]
byte
,
tid
Tid
,
err
error
)
/* generalized ^^^
LoadBefore(oid Oid, beforeTid Tid) (data []byte, tid Tid, err error)
LoadSerial(oid Oid, serial Tid) (data []byte, err error)
*/
// -> Prefetch(xid Xid) ...
// PrefetchBefore(oidv []Oid, beforeTid Tid) error (?)
// Store(oid Oid, serial Tid, data []byte, txn ITransaction) error
...
...
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