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
16d90573
Commit
16d90573
authored
Jan 05, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f3effa6c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
12 deletions
+11
-12
go/neo/client.go
go/neo/client.go
+3
-4
go/neo/master.go
go/neo/master.go
+2
-2
go/neo/neo.go
go/neo/neo.go
+2
-2
go/neo/nodetab.go
go/neo/nodetab.go
+3
-3
go/neo/storage.go
go/neo/storage.go
+1
-1
No files found.
go/neo/client.go
View file @
16d90573
// Copyright (C) 2017-202
0
Nexedi SA and Contributors.
// Copyright (C) 2017-202
1
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
...
...
@@ -103,7 +103,7 @@ func NewClient(clusterName, masterAddr string, net xnet.Networker) *Client {
}
// Run starts client node and runs it until either ctx is canceled or master
// commands it to shutdown. (
XXX
verify M->shutdown)
// commands it to shutdown. (
TODO
verify M->shutdown)
func
(
cli
*
Client
)
Run
(
ctx
context
.
Context
)
error
{
// run process which performs master talk
ctx
,
cancel
:=
context
.
WithCancel
(
ctx
)
...
...
@@ -295,7 +295,6 @@ func (c *Client) talkMaster1(ctx context.Context) (err error) {
opready
()
// set c.mlink and notify waiters
c
.
mlinkMu
.
Lock
()
c
.
mlink
=
mlink
...
...
@@ -505,7 +504,7 @@ func (c *Client) Sync(ctx context.Context) (_ zodb.Tid, err error) {
err
=
mlink
.
Ask1
(
&
proto
.
LastTransaction
{},
&
reply
)
// XXX Ask += ctx
if
err
!=
nil
{
// XXX ZODBErrDecode?
return
0
,
err
// XXX err ctx
return
0
,
err
}
return
reply
.
Tid
,
nil
}
...
...
go/neo/master.go
View file @
16d90573
// Copyright (C) 2017-202
0
Nexedi SA and Contributors.
// Copyright (C) 2017-202
1
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
...
...
@@ -210,7 +210,7 @@ func (m *Master) Run(ctx context.Context, l xnet.Listener) (err error) {
return
err
}
// runMain is the process
which
implements main master cluster management logic: node tracking, cluster
// runMain is the process
that
implements main master cluster management logic: node tracking, cluster
// state updates, scheduling data movement between storage nodes etc.
func
(
m
*
Master
)
runMain
(
ctx
context
.
Context
)
(
err
error
)
{
defer
task
.
Running
(
&
ctx
,
"main"
)(
&
err
)
...
...
go/neo/neo.go
View file @
16d90573
// Copyright (C) 2016-202
0
Nexedi SA and Contributors.
// Copyright (C) 2016-202
1
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
...
...
@@ -150,7 +150,6 @@ func (app *NodeApp) Dial(ctx context.Context, peerType proto.NodeType, addr stri
// Listener is LinkListener adapted to return NodeLink with requested identification on Accept.
// XXX name -> idListener?
type
Listener
interface
{
// from LinkListener:
Close
()
error
...
...
@@ -172,6 +171,7 @@ type Listener interface {
}
// requireIdentifyHello wraps inner LinkListener into ^^^ Listener.
// XXX naming -> NewListener ?
func
requireIdentifyHello
(
inner
neonet
.
LinkListener
)
Listener
{
return
&
listener
{
l
:
inner
}
}
...
...
go/neo/nodetab.go
View file @
16d90573
// Copyright (C) 2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Copyright (C) 2017
-2021
Nexedi SA and Contributors.
//
Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
...
...
@@ -77,7 +77,7 @@ type NodeTable struct {
// Node represents a peer node in the cluster.
//
// XXX name as Peer?
// XXX name as Peer?
PeerNode?
type
Node
struct
{
nodeTab
*
NodeTable
// this node is part of
...
...
go/neo/storage.go
View file @
16d90573
// Copyright (C) 2016-202
0
Nexedi SA and Contributors.
// Copyright (C) 2016-202
1
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
...
...
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