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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
73b9c447
Commit
73b9c447
authored
Oct 21, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e9af596e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
go/neo/client.go
go/neo/client.go
+6
-4
go/neo/neo.go
go/neo/neo.go
+1
-1
go/neo/nodetab.go
go/neo/nodetab.go
+2
-0
go/neo/py/runneo.py
go/neo/py/runneo.py
+3
-2
No files found.
go/neo/client.go
View file @
73b9c447
...
@@ -183,6 +183,7 @@ func (c *Client) updateOperational() (sendReady func()) {
...
@@ -183,6 +183,7 @@ func (c *Client) updateOperational() (sendReady func()) {
//
//
// The only error possible is if provided ctx cancels.
// The only error possible is if provided ctx cancels.
// XXX and client stopped/closed? (ctx passed to Run cancelled)
// XXX and client stopped/closed? (ctx passed to Run cancelled)
// XXX change signature to call f from under withOperational ?
func
(
c
*
Client
)
withOperational
(
ctx
context
.
Context
)
error
{
func
(
c
*
Client
)
withOperational
(
ctx
context
.
Context
)
error
{
for
{
for
{
c
.
node
.
StateMu
.
RLock
()
c
.
node
.
StateMu
.
RLock
()
...
@@ -314,14 +315,15 @@ func (c *Client) recvMaster1(ctx context.Context, req neonet.Request) error {
...
@@ -314,14 +315,15 @@ func (c *Client) recvMaster1(ctx context.Context, req neonet.Request) error {
c
.
node
.
StateMu
.
Unlock
()
c
.
node
.
StateMu
.
Unlock
()
return
fmt
.
Errorf
(
"unexpected message: %T"
,
msg
)
return
fmt
.
Errorf
(
"unexpected message: %T"
,
msg
)
//
M sends whole PT
//
<- whole partTab
case
*
proto
.
SendPartitionTable
:
case
*
proto
.
SendPartitionTable
:
c
.
node
.
UpdatePartTab
(
ctx
,
msg
)
c
.
node
.
UpdatePartTab
(
ctx
,
msg
)
//
M sends δPT
//
<- δ(partTab)
//
case *proto.NotifyPartitionChanges:
case
*
proto
.
NotifyPartitionChanges
:
// TODO
panic
(
"TODO δ(partTab)"
)
// <- δ(nodeTab)
case
*
proto
.
NotifyNodeInformation
:
case
*
proto
.
NotifyNodeInformation
:
c
.
node
.
UpdateNodeTab
(
ctx
,
msg
)
c
.
node
.
UpdateNodeTab
(
ctx
,
msg
)
...
...
go/neo/neo.go
View file @
73b9c447
...
@@ -299,7 +299,7 @@ func (app *NodeApp) UpdateNodeTab(ctx context.Context, msg *proto.NotifyNodeInfo
...
@@ -299,7 +299,7 @@ func (app *NodeApp) UpdateNodeTab(ctx context.Context, msg *proto.NotifyNodeInfo
app
.
NodeTab
.
Update
(
nodeInfo
)
app
.
NodeTab
.
Update
(
nodeInfo
)
// XXX we have to provide IdTime when requesting identification to other peers
// XXX we have to provide IdTime when requesting identification to other peers
// (e.g. Spy checks this is what master broadcast them and if not replis "unknown by master")
// (e.g. Spy checks this is what master broadcast them and if not repli
e
s "unknown by master")
if
nodeInfo
.
UUID
==
app
.
MyInfo
.
UUID
{
if
nodeInfo
.
UUID
==
app
.
MyInfo
.
UUID
{
// XXX recheck locking
// XXX recheck locking
// XXX do .MyInfo = nodeInfo ?
// XXX do .MyInfo = nodeInfo ?
...
...
go/neo/nodetab.go
View file @
73b9c447
...
@@ -148,6 +148,8 @@ func (nt *NodeTable) Update(nodeInfo proto.NodeInfo) *Node {
...
@@ -148,6 +148,8 @@ func (nt *NodeTable) Update(nodeInfo proto.NodeInfo) *Node {
}
}
*/
*/
// XXX close link if .state becomes DOWN ?
traceNodeChanged
(
nt
,
node
)
traceNodeChanged
(
nt
,
node
)
nt
.
notify
(
node
.
NodeInfo
)
nt
.
notify
(
node
.
NodeInfo
)
...
...
go/neo/py/runneo.py
View file @
73b9c447
...
@@ -21,6 +21,9 @@
...
@@ -21,6 +21,9 @@
"""runneo.py runs NEO/py cluster for NEO/go testing.
"""runneo.py runs NEO/py cluster for NEO/go testing.
Usage: runneo.py <workdir> <cluster-name> XXX + (**kw for NEOCluster)
Usage: runneo.py <workdir> <cluster-name> XXX + (**kw for NEOCluster)
<workdir>/ready is created with address of master after spawned cluster becomes
operational.
"""
"""
from
neo.tests.functional
import
NEOCluster
from
neo.tests.functional
import
NEOCluster
...
@@ -61,11 +64,9 @@ def main():
...
@@ -61,11 +64,9 @@ def main():
os
.
unlink
(
readyf
)
os
.
unlink
(
readyf
)
defer
(
_
)
defer
(
_
)
while
1
:
while
1
:
sleep
(
1
)
sleep
(
1
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
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