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
8fe482d8
Commit
8fe482d8
authored
Jul 08, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e042b296
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+2
-2
go/zodb/storage/zeo/zrpc.go
go/zodb/storage/zeo/zrpc.go
+6
-6
No files found.
go/zodb/storage/zeo/zeo.go
View file @
8fe482d8
...
...
@@ -40,7 +40,7 @@ type zeo struct {
srv
*
zLink
// state we get from server by way of server notifications.
mu
sync
.
Mutex
mu
sync
.
Mutex
lastTid
zodb
.
Tid
...
...
@@ -65,7 +65,7 @@ func (z *zeo) Load(ctx context.Context, xid zodb.Xid) (*mem.Buf, zodb.Tid, error
func
(
z
*
zeo
)
_Load
(
ctx
context
.
Context
,
xid
zodb
.
Xid
)
(
*
mem
.
Buf
,
zodb
.
Tid
,
error
)
{
rpc
:=
z
.
rpc
(
"loadBefore"
)
xres
,
err
:=
rpc
.
call
(
ctx
,
oidPack
(
xid
.
Oid
),
tidPack
(
xid
.
At
+
1
))
// XXX at2Before
xres
,
err
:=
rpc
.
call
(
ctx
,
oidPack
(
xid
.
Oid
),
tidPack
(
xid
.
At
+
1
))
// XXX at2Before
if
err
!=
nil
{
return
nil
,
0
,
err
}
...
...
go/zodb/storage/zeo/zrpc.go
View file @
8fe482d8
...
...
@@ -46,9 +46,9 @@ const pktHeaderLen = 4
// we can speak this protocol versions
var
protoVersions
=
[]
string
{
"3101"
,
// last in ZEO3 series
"4"
,
// no longer call load.
"5"
,
// current in ZEO5 series.
"3101"
,
// last in ZEO3 series
"4"
,
// no longer call load.
"5"
,
// current in ZEO5 series.
}
...
...
@@ -187,7 +187,7 @@ func pktDecode(pkb *pktBuf) (msg, error) {
return
m
,
err
}
tpkt
,
ok
:=
xpkt
.
(
pickle
.
Tuple
)
// XXX also list?
tpkt
,
ok
:=
xpkt
.
(
pickle
.
Tuple
)
// XXX also list?
if
!
ok
{
return
m
,
derrf
(
"got %T; expected tuple"
,
xpkt
)
}
...
...
@@ -249,7 +249,7 @@ func (zl *zLink) _call(ctx context.Context, method string, argv ...interface{})
}
// ok, pkt is ready to go
err
=
zl
.
sendPkt
(
pkb
)
// XXX ctx cancel
err
=
zl
.
sendPkt
(
pkb
)
// XXX ctx cancel
if
err
!=
nil
{
return
msg
{},
err
}
...
...
@@ -301,7 +301,7 @@ var pkbPool = sync.Pool{New: func() interface{} {
func
allocPkb
()
*
pktBuf
{
pkb
:=
pkbPool
.
Get
()
.
(
*
pktBuf
)
pkb
.
data
=
pkb
.
data
[
:
0
]
pkb
.
Write
([]
byte
(
"
\x00\x00\x00\x00
"
))
// room for header (= pktHeaderLen)
pkb
.
Write
([]
byte
(
"
\x00\x00\x00\x00
"
))
// room for header (= pktHeaderLen)
return
pkb
}
...
...
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