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
364cd868
Commit
364cd868
authored
Sep 03, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4092621e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
go/neo/neo.go
go/neo/neo.go
+1
-0
go/neo/proto.go
go/neo/proto.go
+6
-1
go/neo/t/t.sh
go/neo/t/t.sh
+8
-3
No files found.
go/neo/neo.go
View file @
364cd868
...
@@ -109,6 +109,7 @@ func (app *NodeApp) Dial(ctx context.Context, peerType NodeType, addr string) (_
...
@@ -109,6 +109,7 @@ func (app *NodeApp) Dial(ctx context.Context, peerType NodeType, addr string) (_
return
nil
,
nil
,
err
return
nil
,
nil
,
err
}
}
log
.
Info
(
ctx
,
"dialed ok; requesting identification..."
)
defer
xerr
.
Contextf
(
&
err
,
"%s: request identification"
,
link
)
defer
xerr
.
Contextf
(
&
err
,
"%s: request identification"
,
link
)
// close link on error or FIXME: ctx cancel
// close link on error or FIXME: ctx cancel
//cleanup := xio.CloseWhenDone(ctx, link)
//cleanup := xio.CloseWhenDone(ctx, link)
...
...
go/neo/proto.go
View file @
364cd868
...
@@ -164,7 +164,7 @@ type Msg interface {
...
@@ -164,7 +164,7 @@ type Msg interface {
neoMsgDecode
(
data
[]
byte
)
(
nread
int
,
err
error
)
neoMsgDecode
(
data
[]
byte
)
(
nread
int
,
err
error
)
}
}
// FIXME not pkt
type
Address
struct
{
type
Address
struct
{
Host
string
Host
string
Port
uint16
Port
uint16
...
@@ -233,6 +233,7 @@ func float64_NEODecode(b []byte) float64 {
...
@@ -233,6 +233,7 @@ func float64_NEODecode(b []byte) float64 {
}
}
// NodeInfo is information about a node
// NodeInfo is information about a node
// FIXME not pkt
type
NodeInfo
struct
{
type
NodeInfo
struct
{
Type
NodeType
Type
NodeType
Addr
Address
// serving address
Addr
Address
// serving address
...
@@ -241,11 +242,13 @@ type NodeInfo struct {
...
@@ -241,11 +242,13 @@ type NodeInfo struct {
IdTimestamp
float64
// FIXME clarify semantic where it is used
IdTimestamp
float64
// FIXME clarify semantic where it is used
}
}
// FIXME not pkt
type
CellInfo
struct
{
type
CellInfo
struct
{
UUID
NodeUUID
UUID
NodeUUID
State
CellState
State
CellState
}
}
// FIXME not pkt
type
RowInfo
struct
{
type
RowInfo
struct
{
Offset
uint32
// PNumber XXX -> Pid
Offset
uint32
// PNumber XXX -> Pid
CellList
[]
CellInfo
CellList
[]
CellInfo
...
@@ -256,6 +259,7 @@ type RowInfo struct {
...
@@ -256,6 +259,7 @@ type RowInfo struct {
// Error is a special type of message, because this can be sent against
// Error is a special type of message, because this can be sent against
// any other message, even if such a message does not expect a reply
// any other message, even if such a message does not expect a reply
// usually. Any -> Any.
// usually. Any -> Any.
// FIXME -> |RESPONSE_MASK
type
Error
struct
{
type
Error
struct
{
Code
ErrorCode
// PNumber
Code
ErrorCode
// PNumber
Message
string
Message
string
...
@@ -272,6 +276,7 @@ type CloseClient struct {
...
@@ -272,6 +276,7 @@ type CloseClient struct {
// Request a node identification. This must be the first message for any
// Request a node identification. This must be the first message for any
// connection. Any -> Any.
// connection. Any -> Any.
// XXX must go before ping
type
RequestIdentification
struct
{
type
RequestIdentification
struct
{
NodeType
NodeType
// XXX name
NodeType
NodeType
// XXX name
UUID
NodeUUID
UUID
NodeUUID
...
...
go/neo/t/t.sh
View file @
364cd868
...
@@ -9,17 +9,21 @@ Sbind=127.0.0.1:5553
...
@@ -9,17 +9,21 @@ Sbind=127.0.0.1:5553
# cluster name
# cluster name
cluster
=
pygotest
cluster
=
pygotest
# logs
logdir
=
`
pwd
`
/log
mkdir
-p
$logdir
# M{py,go}
# M{py,go}
# spawn master
# spawn master
Mpy
()
{
Mpy
()
{
# XXX --autostart=1 ?
# XXX --autostart=1 ?
neomaster
--cluster
=
$cluster
--bind
=
$Mbind
--masters
=
$Mbind
-r
1
-p
1
--logfile
=
`
pwd
`
/Mpy.log &
exec
-a
Mpy
\
neomaster
--cluster
=
$cluster
--bind
=
$Mbind
--masters
=
$Mbind
-r
1
-p
1
--logfile
=
$logdir
/Mpy.log &
}
}
Mgo
()
{
Mgo
()
{
exec
-a
Mgo
\
exec
-a
Mgo
\
neo
--log_dir
=
`
pwd
`
master
-cluster
=
$cluster
-bind
=
$Mbind
neo
--log_dir
=
$logdir
master
-cluster
=
$cluster
-bind
=
$Mbind
}
}
# TODO Spy
# TODO Spy
...
@@ -28,13 +32,14 @@ Mgo() {
...
@@ -28,13 +32,14 @@ Mgo() {
# spawn storage
# spawn storage
Sgo
()
{
Sgo
()
{
exec
-a
Sgo
\
exec
-a
Sgo
\
neo
-log_dir
=
`
pwd
`
storage
-cluster
=
$cluster
-bind
=
$Sbind
-masters
=
$Mbind
$@
&
neo
-log_dir
=
$logdir
-alsologtostderr
storage
-cluster
=
$cluster
-bind
=
$Sbind
-masters
=
$Mbind
$@
&
}
}
# spawn Mpy + Sgo
# spawn Mpy + Sgo
Mpy
Mpy
sleep
0.2
# XXX temp for debug: so master could start listening and first S connect try is not error
Sgo ../../zodb/storage/fs1/testdata/1.fs
Sgo ../../zodb/storage/fs1/testdata/1.fs
wait
wait
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