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
e21fe877
Commit
e21fe877
authored
Feb 12, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a726770c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
go/neo/master.go
go/neo/master.go
+7
-11
No files found.
go/neo/master.go
View file @
e21fe877
...
...
@@ -683,7 +683,7 @@ func (m *Master) verify(ctx context.Context) (err error) {
}
// start verification on all storages we are currently in touch with
for
_
,
peer
:=
range
m
.
peerTab
()
{
for
_
,
peer
:=
range
m
.
peerTab
{
if
peer
.
node
.
Type
==
proto
.
STORAGE
{
goStorCtlVerify
(
peer
)
}
...
...
@@ -794,26 +794,23 @@ loop2:
// storVerify is result of a storage node passing verification phase.
type
storVerify
struct
{
stor
*
xneo
.
PeerNode
stor
*
_MasteredPeer
lastOid
zodb
.
Oid
lastTid
zodb
.
Tid
err
error
}
// storCtlVerify drives a storage node during cluster verifying (= starting) state.
func
storCtlVerify
(
ctx
context
.
Context
,
stor
*
xneo
.
PeerNode
,
pt
*
xneo
.
PartitionTable
,
res
chan
storVerify
)
{
func
storCtlVerify
(
ctx
context
.
Context
,
stor
*
_MasteredPeer
,
pt
*
xneo
.
PartitionTable
)
(
lastOid
zodb
.
Oid
,
lastTid
zodb
.
Tid
,
err
error
)
{
// XXX link.Close on err -> = xcontext.WithCloseOnErrCancel
// XXX cancel on ctx -> = ^^^
var
err
error
defer
func
()
{
if
err
!=
nil
{
res
<-
storVerify
{
stor
:
stor
,
err
:
err
}
}
}()
slink
:=
stor
.
Link
()
defer
task
.
Runningf
(
&
ctx
,
"%s: stor verify"
,
stor
.
node
.
NID
)(
&
err
)
lastOid
=
zodb
.
InvalidOid
lastTid
=
zodb
.
InvalidTid
// send just recovered parttab so storage saves it
err
=
slink
.
Send1
(
&
proto
.
SendPartitionTable
{
PTid
:
pt
.
PTid
,
...
...
@@ -842,8 +839,7 @@ func storCtlVerify(ctx context.Context, stor *xneo.PeerNode, pt *xneo.PartitionT
return
}
// send results to driver
res
<-
storVerify
{
stor
:
stor
,
lastOid
:
last
.
LastOid
,
lastTid
:
last
.
LastTid
}
return
last
.
LastOid
,
last
.
LastTid
,
nil
}
...
...
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