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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
a9848fe7
Commit
a9848fe7
authored
Sep 12, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fc69bd18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
go/neo/client/client.go
go/neo/client/client.go
+3
-3
go/neo/proto.go
go/neo/proto.go
+1
-1
go/neo/server/storage.go
go/neo/server/storage.go
+3
-3
No files found.
go/neo/client/client.go
View file @
a9848fe7
...
...
@@ -379,7 +379,7 @@ func (c *Client) LastOid(ctx context.Context) (zodb.Oid, error) {
panic
(
"TODO"
)
}
func
(
c
*
Client
)
Load
(
ctx
context
.
Context
,
xid
zodb
.
Xid
)
(
data
*
zodb
.
Buf
,
serial
zodb
.
Tid
,
err
error
)
{
func
(
c
*
Client
)
Load
(
ctx
context
.
Context
,
xid
zodb
.
Xid
)
(
buf
*
zodb
.
Buf
,
serial
zodb
.
Tid
,
err
error
)
{
defer
func
()
{
switch
err
.
(
type
)
{
case
nil
:
...
...
@@ -446,7 +446,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data *zodb.Buf, serial
return
nil
,
0
,
err
// XXX err context
}
buf
=
resp
.
Data
Buf
buf
=
resp
.
Data
//checksum := sha1.Sum(buf.Data)
//if checksum != resp.Checksum {
...
...
@@ -469,7 +469,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data *zodb.Buf, serial
// reply.NextSerial
// reply.DataSerial
return
data
,
resp
.
Serial
,
nil
return
buf
,
resp
.
Serial
,
nil
}
func
(
c
*
Client
)
Iterate
(
tidMin
,
tidMax
zodb
.
Tid
)
zodb
.
ITxnIterator
{
...
...
go/neo/proto.go
View file @
a9848fe7
...
...
@@ -646,7 +646,7 @@ type AnswerObject struct {
NextSerial
zodb
.
Tid
// XXX but there it is out of sync
Compression
bool
Checksum
Checksum
Data
Buf
*
zodb
.
Buf
// TODO encode -> separately (for writev)
Data
*
zodb
.
Buf
// TODO encode -> separately (for writev)
DataSerial
zodb
.
Tid
}
...
...
go/neo/server/storage.go
View file @
a9848fe7
...
...
@@ -502,7 +502,7 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
xid
.
TidBefore
=
true
}
data
,
tid
,
err
:=
stor
.
zstor
.
Load
(
ctx
,
xid
)
buf
,
tid
,
err
:=
stor
.
zstor
.
Load
(
ctx
,
xid
)
if
err
!=
nil
{
// translate err to NEO protocol error codes
return
neo
.
ErrEncode
(
err
)
...
...
@@ -513,8 +513,8 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
Serial
:
tid
,
Compression
:
false
,
Data
:
data
,
//Checksum: sha1.Sum(
d
ata), // XXX computing every time
Data
:
buf
,
//Checksum: sha1.Sum(
buf.D
ata), // XXX computing every time
// XXX .NextSerial
// XXX .DataSerial
...
...
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