Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefane Fermigier
neo
Commits
dfea9d1c
Commit
dfea9d1c
authored
Apr 09, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a02b6fd8
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
25 deletions
+9
-25
go/neo/client.go
go/neo/client.go
+2
-4
go/neo/cluster_test.go
go/neo/cluster_test.go
+1
-1
go/neo/cmd/neo/master.go
go/neo/cmd/neo/master.go
+0
-7
go/neo/cmd/neo/storage.go
go/neo/cmd/neo/storage.go
+0
-7
go/neo/master.go
go/neo/master.go
+1
-1
go/neo/storage.go
go/neo/storage.go
+2
-2
go/neo/t/tcpu.py
go/neo/t/tcpu.py
+2
-2
go/xcommon/xtracing/tracetest/tracetest.go
go/xcommon/xtracing/tracetest/tracetest.go
+1
-1
No files found.
go/neo/client.go
View file @
dfea9d1c
...
@@ -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
}
}
...
...
go/neo/cluster_test.go
View file @
dfea9d1c
...
@@ -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"
)
)
...
...
go/neo/cmd/neo/master.go
View file @
dfea9d1c
...
@@ -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
)
...
...
go/neo/cmd/neo/storage.go
View file @
dfea9d1c
...
@@ -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
{
...
...
go/neo/master.go
View file @
dfea9d1c
...
@@ -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
...
...
go/neo/storage.go
View file @
dfea9d1c
...
@@ -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
{
...
...
go/neo/t/tcpu.py
View file @
dfea9d1c
...
@@ -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
):
...
...
go/xcommon/xtracing/tracetest/tracetest.go
View file @
dfea9d1c
...
@@ -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 event
s
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
...
...
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