Commit dfea9d1c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a02b6fd8
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
// See https://www.nexedi.com/licensing for rationale and options. // See https://www.nexedi.com/licensing for rationale and options.
package neo package neo
// client node // client node with ZODB storage interface for accessing NEO cluster.
// XXX old: Package client provides ZODB storage interface for accessing NEO cluster.
import ( import (
"context" "context"
...@@ -103,7 +101,7 @@ func (cli *Client) run(ctx context.Context) error { ...@@ -103,7 +101,7 @@ func (cli *Client) run(ctx context.Context) error {
func (c *Client) Close() error { func (c *Client) Close() error {
c.talkMasterCancel() c.talkMasterCancel()
// XXX wait talkMaster finishes // XXX wait talkMaster finishes -> XXX return err from that?
// XXX what else? // XXX what else?
return nil return nil
} }
......
...@@ -26,6 +26,7 @@ import ( ...@@ -26,6 +26,7 @@ import (
"bytes" "bytes"
"context" "context"
"crypto/sha1" "crypto/sha1"
"fmt"
"io" "io"
"net" "net"
"reflect" "reflect"
...@@ -50,7 +51,6 @@ import ( ...@@ -50,7 +51,6 @@ import (
"lab.nexedi.com/kirr/go123/xnet" "lab.nexedi.com/kirr/go123/xnet"
"lab.nexedi.com/kirr/go123/xnet/pipenet" "lab.nexedi.com/kirr/go123/xnet/pipenet"
"fmt"
"time" "time"
) )
......
...@@ -66,13 +66,6 @@ func masterMain(argv []string) { ...@@ -66,13 +66,6 @@ func masterMain(argv []string) {
net := xnet.NetPlain("tcp") // TODO + TLS; not only "tcp" ? net := xnet.NetPlain("tcp") // TODO + TLS; not only "tcp" ?
ctx := context.Background() ctx := context.Background()
/*
ctx, cancel := context.WithCancel(context.Background())
go func() {
time.Sleep(3 * time.Second)
cancel()
}()
*/
err := listenAndServe(ctx, net, *bind, func(ctx context.Context, l stdnet.Listener) error { err := listenAndServe(ctx, net, *bind, func(ctx context.Context, l stdnet.Listener) error {
master := neo.NewMaster(*cluster, net) master := neo.NewMaster(*cluster, net)
......
...@@ -99,13 +99,6 @@ func storageMain(argv []string) { ...@@ -99,13 +99,6 @@ func storageMain(argv []string) {
runtime.GOMAXPROCS(maxprocs*8) // XXX *8 is enough? runtime.GOMAXPROCS(maxprocs*8) // XXX *8 is enough?
ctx := context.Background() ctx := context.Background()
/*
ctx, cancel := context.WithCancel(context.Background())
go func() {
time.Sleep(3 * time.Second)
cancel()
}()
*/
back, err := storage.OpenBackend(ctx, argv[0]) back, err := storage.OpenBackend(ctx, argv[0])
if err != nil { if err != nil {
......
...@@ -43,7 +43,7 @@ import ( ...@@ -43,7 +43,7 @@ import (
"lab.nexedi.com/kirr/neo/go/xcommon/xio" "lab.nexedi.com/kirr/neo/go/xcommon/xio"
) )
// Master is a node overseeing and managing how whole NEO cluster works // Master is a node overseeing and managing how whole NEO cluster works.
type Master struct { type Master struct {
node *NodeApp node *NodeApp
......
...@@ -324,7 +324,7 @@ func (stor *Storage) m1initialize1(ctx context.Context, req neonet.Request) erro ...@@ -324,7 +324,7 @@ func (stor *Storage) m1initialize1(ctx context.Context, req neonet.Request) erro
// //
// Service is regular phase serving requests from clients to load/save objects, // Service is regular phase serving requests from clients to load/save objects,
// handling transaction commit (with master) and syncing data with other // handling transaction commit (with master) and syncing data with other
// storage nodes (XXX correct?). // storage nodes.
// //
// it always returns with an error describing why serve had to be stopped - // it always returns with an error describing why serve had to be stopped -
// either due to master commanding us to stop, or context cancel or some other // either due to master commanding us to stop, or context cancel or some other
...@@ -342,7 +342,7 @@ func (stor *Storage) m1serve(ctx context.Context, reqStart *neonet.Request) (err ...@@ -342,7 +342,7 @@ func (stor *Storage) m1serve(ctx context.Context, reqStart *neonet.Request) (err
defer opCancel() defer opCancel()
// reply M we are ready // reply M we are ready
// XXX according to current neo/py this is separate send - not reply - and so we do here // XXX NEO/py sends NotifyReady on another conn; we patched py; see 4eaaf186 for context
err = reqStart.Reply(&proto.NotifyReady{}) err = reqStart.Reply(&proto.NotifyReady{})
reqStart.Close() reqStart.Close()
if err != nil { if err != nil {
......
...@@ -52,8 +52,8 @@ def prettyarg(arg): ...@@ -52,8 +52,8 @@ def prettyarg(arg):
# ---- 8< ---- from wendelin.core/t/py.bench # ---- 8< ---- from wendelin.core/t/py.bench
# benchmarking timer/request passed to benchmarks as fixture # B is benchmarking timer/request passed to benchmarks as fixture
# similar to https://golang.org/pkg/testing/#B # similar to https://golang.org/pkg/testing/#B.
class B: class B:
def __init__(self): def __init__(self):
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
// See https://www.nexedi.com/licensing for rationale and options. // See https://www.nexedi.com/licensing for rationale and options.
// Package tracetest provides infrastructure for testing concurrent systems // Package tracetest provides infrastructure for testing concurrent systems
// based on synchronous events tracing. // based on synchronous event tracing.
// //
// A serial system can be verified by checking that its execution produces // A serial system can be verified by checking that its execution produces
// expected serial stream of events. But concurrent systems cannot be verified // expected serial stream of events. But concurrent systems cannot be verified
......
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