Commit 364cd868 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4092621e
...@@ -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)
......
...@@ -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
......
...@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment