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) (_
return nil, nil, err
}
log.Info(ctx, "dialed ok; requesting identification...")
defer xerr.Contextf(&err, "%s: request identification", link)
// close link on error or FIXME: ctx cancel
//cleanup := xio.CloseWhenDone(ctx, link)
......
......@@ -164,7 +164,7 @@ type Msg interface {
neoMsgDecode(data []byte) (nread int, err error)
}
// FIXME not pkt
type Address struct {
Host string
Port uint16
......@@ -233,6 +233,7 @@ func float64_NEODecode(b []byte) float64 {
}
// NodeInfo is information about a node
// FIXME not pkt
type NodeInfo struct {
Type NodeType
Addr Address // serving address
......@@ -241,11 +242,13 @@ type NodeInfo struct {
IdTimestamp float64 // FIXME clarify semantic where it is used
}
// FIXME not pkt
type CellInfo struct {
UUID NodeUUID
State CellState
}
// FIXME not pkt
type RowInfo struct {
Offset uint32 // PNumber XXX -> Pid
CellList []CellInfo
......@@ -256,6 +259,7 @@ type RowInfo struct {
// 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
// usually. Any -> Any.
// FIXME -> |RESPONSE_MASK
type Error struct {
Code ErrorCode // PNumber
Message string
......@@ -272,6 +276,7 @@ type CloseClient struct {
// Request a node identification. This must be the first message for any
// connection. Any -> Any.
// XXX must go before ping
type RequestIdentification struct {
NodeType NodeType // XXX name
UUID NodeUUID
......
......@@ -9,17 +9,21 @@ Sbind=127.0.0.1:5553
# cluster name
cluster=pygotest
# logs
logdir=`pwd`/log
mkdir -p $logdir
# M{py,go}
# spawn master
Mpy() {
# 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() {
exec -a Mgo \
neo --log_dir=`pwd` master -cluster=$cluster -bind=$Mbind
neo --log_dir=$logdir master -cluster=$cluster -bind=$Mbind
}
# TODO Spy
......@@ -28,13 +32,14 @@ Mgo() {
# spawn storage
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
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
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