Commit 6bd82a84 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a2115a46
...@@ -230,7 +230,6 @@ func float64_NEODecode(b []byte) float64 { ...@@ -230,7 +230,6 @@ func float64_NEODecode(b []byte) float64 {
} }
// NodeInfo is information about a node // NodeInfo is information about a node
// XXX -> nodetab.go ?
type NodeInfo struct { type NodeInfo struct {
Type NodeType Type NodeType
Addr Address // serving address Addr Address // serving address
...@@ -239,7 +238,6 @@ type NodeInfo struct { ...@@ -239,7 +238,6 @@ type NodeInfo struct {
IdTimestamp float64 // FIXME clarify semantic where it is used IdTimestamp float64 // FIXME clarify semantic where it is used
} }
// XXX -> parttab.go ?
type CellInfo struct { type CellInfo struct {
NodeUUID NodeUUID
CellState CellState
......
...@@ -48,6 +48,7 @@ import ( ...@@ -48,6 +48,7 @@ import (
"lab.nexedi.com/kirr/go123/exc" "lab.nexedi.com/kirr/go123/exc"
"fmt" "fmt"
"time"
) )
// XXX dup from connection_test // XXX dup from connection_test
...@@ -296,8 +297,9 @@ func TestMasterStorage(t *testing.T) { ...@@ -296,8 +297,9 @@ func TestMasterStorage(t *testing.T) {
// XXX M.partTab <- S1 // XXX M.partTab <- S1
// verification // M starts verification
tc.Expect(clusterState(&M.clusterState, neo.ClusterVerifying)) tc.Expect(clusterState(&M.clusterState, neo.ClusterVerifying))
tc.Expect(conntx("m:2", "s:2", 1, &neo.NotifyPartitionTable{ tc.Expect(conntx("m:2", "s:2", 1, &neo.NotifyPartitionTable{
PTid: 1, PTid: 1,
RowList: []neo.RowInfo{ RowList: []neo.RowInfo{
...@@ -305,6 +307,12 @@ func TestMasterStorage(t *testing.T) { ...@@ -305,6 +307,12 @@ func TestMasterStorage(t *testing.T) {
}, },
})) }))
tc.Expect(conntx("m:2", "s:2", 1, &neo.LockedTransactions{}))
tc.Expect(conntx("s:2", "m:2", 1, &neo.AnswerLockedTransactions{
TidDict: nil, // map[zodb.Tid]zodb.Tid{},
}))
// expect: // expect:
// ? M -> S ClusterInformation(VERIFICATION) // ? M -> S ClusterInformation(VERIFICATION)
...@@ -337,7 +345,9 @@ func TestMasterStorage(t *testing.T) { ...@@ -337,7 +345,9 @@ func TestMasterStorage(t *testing.T) {
// TODO test M.recovery starting back from verification/service // TODO test M.recovery starting back from verification/service
// (M needs to resend to all storages recovery messages just from start) // (M needs to resend to all storages recovery messages just from start)
time.Sleep(100*time.Millisecond) // XXX temp so net tx'ers could actually tx
return return
Mcancel() // FIXME ctx cancel not fully handled Mcancel() // FIXME ctx cancel not fully handled
Scancel() // ---- // ---- Scancel() // ---- // ----
xwait(gwg) xwait(gwg)
......
...@@ -458,7 +458,7 @@ loop2: ...@@ -458,7 +458,7 @@ loop2:
// recovery successful - we are starting // recovery successful - we are starting
// S PENDING -> RUNNING // S PENDING -> RUNNING
// XXX recheck logic is ok for starting existing cluster // XXX recheck logic is ok for when starting existing cluster
for _, stor := range m.nodeTab.StorageList() { for _, stor := range m.nodeTab.StorageList() {
if stor.State == neo.PENDING { if stor.State == neo.PENDING {
m.nodeTab.SetNodeState(stor, neo.RUNNING) m.nodeTab.SetNodeState(stor, neo.RUNNING)
......
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