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
b82154d5
Commit
b82154d5
authored
Jul 14, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/zodb/zeo: Use zlink as term for link in between peers
Just renaming.
parent
5a48e702
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+11
-11
No files found.
go/zodb/storage/zeo/zeo.go
View file @
b82154d5
...
...
@@ -39,7 +39,7 @@ import (
)
type
zeo
struct
{
srv
*
zLink
link
*
zLink
// state we get from server by way of server notifications.
mu
sync
.
Mutex
...
...
@@ -130,11 +130,11 @@ func ereplyf(addr, method, format string, argv ...interface{}) *errorUnexpectedR
// rpc returns rpc object handy to make calls/create errors
func
(
z
*
zeo
)
rpc
(
method
string
)
rpc
{
return
rpc
{
zl
:
z
.
srv
,
method
:
method
}
return
rpc
{
zl
ink
:
z
.
link
,
method
:
method
}
}
type
rpc
struct
{
zl
*
zLink
zl
ink
*
zLink
method
string
}
...
...
@@ -149,12 +149,12 @@ func (r *rpcExcept) Error() string {
}
func
(
r
rpc
)
call
(
ctx
context
.
Context
,
argv
...
interface
{})
(
interface
{},
error
)
{
reply
,
err
:=
r
.
zl
.
Call
(
ctx
,
r
.
method
,
argv
...
)
reply
,
err
:=
r
.
zl
ink
.
Call
(
ctx
,
r
.
method
,
argv
...
)
if
err
!=
nil
{
return
nil
,
err
}
if
r
.
zl
.
ver
>=
"5"
{
if
r
.
zl
ink
.
ver
>=
"5"
{
// in ZEO5 exceptions are marked via flag
if
reply
.
flags
&
msgExcept
!=
0
{
return
nil
,
r
.
zeo5Error
(
reply
.
arg
)
...
...
@@ -291,7 +291,7 @@ func isPyExceptClass(klass pickle.Class) bool {
}
func
(
r
rpc
)
ereplyf
(
format
string
,
argv
...
interface
{})
*
errorUnexpectedReply
{
return
ereplyf
(
r
.
zl
.
link
.
RemoteAddr
()
.
String
(),
r
.
method
,
format
,
argv
...
)
return
ereplyf
(
r
.
zl
ink
.
link
.
RemoteAddr
()
.
String
(),
r
.
method
,
format
,
argv
...
)
}
...
...
@@ -332,19 +332,19 @@ func openByURL(ctx context.Context, u *url.URL, opt *zodb.DriverOptions) (_ zodb
"won't be notifications about database changes"
)
}
zl
,
err
:=
dialZLink
(
ctx
,
net
,
addr
)
zl
ink
,
err
:=
dialZLink
(
ctx
,
net
,
addr
)
if
err
!=
nil
{
return
nil
,
zodb
.
InvalidTid
,
err
}
defer
func
()
{
if
err
!=
nil
{
zl
.
Close
()
zl
ink
.
Close
()
}
}()
z
:=
&
zeo
{
srv
:
zl
,
watchq
:
opt
.
Watchq
,
url
:
url
}
z
:=
&
zeo
{
link
:
zlink
,
watchq
:
opt
.
Watchq
,
url
:
url
}
rpc
:=
z
.
rpc
(
"register"
)
xlastTid
,
err
:=
rpc
.
call
(
ctx
,
storageID
,
opt
.
ReadOnly
)
...
...
@@ -354,7 +354,7 @@ func openByURL(ctx context.Context, u *url.URL, opt *zodb.DriverOptions) (_ zodb
// register returns last_tid in ZEO5 but nothing earlier.
// if so we have to retrieve last_tid in another RPC.
if
z
.
srv
.
ver
<
"5"
{
if
z
.
link
.
ver
<
"5"
{
rpc
=
z
.
rpc
(
"lastTransaction"
)
xlastTid
,
err
=
rpc
.
call
(
ctx
)
if
err
!=
nil
{
...
...
@@ -397,7 +397,7 @@ func openByURL(ctx context.Context, u *url.URL, opt *zodb.DriverOptions) (_ zodb
}
func
(
z
*
zeo
)
Close
()
error
{
err
:=
z
.
srv
.
Close
()
err
:=
z
.
link
.
Close
()
if
z
.
watchq
!=
nil
{
close
(
z
.
watchq
)
}
...
...
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