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
a9848fe7
Commit
a9848fe7
authored
Sep 12, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fc69bd18
Changes
3
Show 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) {
...
@@ -379,7 +379,7 @@ func (c *Client) LastOid(ctx context.Context) (zodb.Oid, error) {
panic
(
"TODO"
)
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
()
{
defer
func
()
{
switch
err
.
(
type
)
{
switch
err
.
(
type
)
{
case
nil
:
case
nil
:
...
@@ -446,7 +446,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data *zodb.Buf, serial
...
@@ -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
return
nil
,
0
,
err
// XXX err context
}
}
buf
=
resp
.
Data
Buf
buf
=
resp
.
Data
//checksum := sha1.Sum(buf.Data)
//checksum := sha1.Sum(buf.Data)
//if checksum != resp.Checksum {
//if checksum != resp.Checksum {
...
@@ -469,7 +469,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data *zodb.Buf, serial
...
@@ -469,7 +469,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data *zodb.Buf, serial
// reply.NextSerial
// reply.NextSerial
// reply.DataSerial
// reply.DataSerial
return
data
,
resp
.
Serial
,
nil
return
buf
,
resp
.
Serial
,
nil
}
}
func
(
c
*
Client
)
Iterate
(
tidMin
,
tidMax
zodb
.
Tid
)
zodb
.
ITxnIterator
{
func
(
c
*
Client
)
Iterate
(
tidMin
,
tidMax
zodb
.
Tid
)
zodb
.
ITxnIterator
{
...
...
go/neo/proto.go
View file @
a9848fe7
...
@@ -646,7 +646,7 @@ type AnswerObject struct {
...
@@ -646,7 +646,7 @@ type AnswerObject struct {
NextSerial
zodb
.
Tid
// XXX but there it is out of sync
NextSerial
zodb
.
Tid
// XXX but there it is out of sync
Compression
bool
Compression
bool
Checksum
Checksum
Checksum
Checksum
Data
Buf
*
zodb
.
Buf
// TODO encode -> separately (for writev)
Data
*
zodb
.
Buf
// TODO encode -> separately (for writev)
DataSerial
zodb
.
Tid
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
...
@@ -502,7 +502,7 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
xid
.
TidBefore
=
true
xid
.
TidBefore
=
true
}
}
data
,
tid
,
err
:=
stor
.
zstor
.
Load
(
ctx
,
xid
)
buf
,
tid
,
err
:=
stor
.
zstor
.
Load
(
ctx
,
xid
)
if
err
!=
nil
{
if
err
!=
nil
{
// translate err to NEO protocol error codes
// translate err to NEO protocol error codes
return
neo
.
ErrEncode
(
err
)
return
neo
.
ErrEncode
(
err
)
...
@@ -513,8 +513,8 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
...
@@ -513,8 +513,8 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
Serial
:
tid
,
Serial
:
tid
,
Compression
:
false
,
Compression
:
false
,
Data
:
data
,
Data
:
buf
,
//Checksum: sha1.Sum(
d
ata), // XXX computing every time
//Checksum: sha1.Sum(
buf.D
ata), // XXX computing every time
// XXX .NextSerial
// XXX .NextSerial
// XXX .DataSerial
// 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