Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Levin Zimmermann
neoppod
Commits
19dd539e
Commit
19dd539e
authored
Sep 03, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5ed8dbde
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
go/neo/client/client.go
go/neo/client/client.go
+2
-2
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+2
-2
go/neo/server/master.go
go/neo/server/master.go
+1
-1
go/neo/server/storage.go
go/neo/server/storage.go
+3
-3
No files found.
go/neo/client/client.go
View file @
19dd539e
...
@@ -249,7 +249,7 @@ func (c *Client) recvMaster(ctx context.Context, mlink *neo.NodeLink) error {
...
@@ -249,7 +249,7 @@ func (c *Client) recvMaster(ctx context.Context, mlink *neo.NodeLink) error {
return
fmt
.
Errorf
(
"unexpected message: %T"
,
msg
)
return
fmt
.
Errorf
(
"unexpected message: %T"
,
msg
)
// M sends whole PT
// M sends whole PT
case
*
neo
.
Notify
PartitionTable
:
case
*
neo
.
Send
PartitionTable
:
pt
:=
neo
.
PartTabFromDump
(
msg
.
PTid
,
msg
.
RowList
)
pt
:=
neo
.
PartTabFromDump
(
msg
.
PTid
,
msg
.
RowList
)
c
.
node
.
PartTab
=
pt
c
.
node
.
PartTab
=
pt
...
@@ -404,7 +404,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zo
...
@@ -404,7 +404,7 @@ func (c *Client) Load(ctx context.Context, xid zodb.Xid) (data []byte, serial zo
req
.
Tid
=
neo
.
INVALID_TID
req
.
Tid
=
neo
.
INVALID_TID
}
}
resp
:=
neo
.
Answer
Get
Object
{}
resp
:=
neo
.
AnswerObject
{}
err
=
slink
.
Ask1
(
&
req
,
&
resp
)
err
=
slink
.
Ask1
(
&
req
,
&
resp
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
0
,
err
// XXX err context
return
nil
,
0
,
err
// XXX err context
...
...
go/neo/server/cluster_test.go
View file @
19dd539e
...
@@ -314,7 +314,7 @@ func TestMasterStorage(t *testing.T) {
...
@@ -314,7 +314,7 @@ func TestMasterStorage(t *testing.T) {
// M starts verification
// M starts verification
tc
.
Expect
(
clusterState
(
&
M
.
node
.
ClusterState
,
neo
.
ClusterVerifying
))
tc
.
Expect
(
clusterState
(
&
M
.
node
.
ClusterState
,
neo
.
ClusterVerifying
))
tc
.
Expect
(
conntx
(
"m:2"
,
"s:2"
,
4
,
&
neo
.
Notify
PartitionTable
{
tc
.
Expect
(
conntx
(
"m:2"
,
"s:2"
,
4
,
&
neo
.
Send
PartitionTable
{
PTid
:
1
,
PTid
:
1
,
RowList
:
[]
neo
.
RowInfo
{
RowList
:
[]
neo
.
RowInfo
{
{
0
,
[]
neo
.
CellInfo
{{
neo
.
UUID
(
neo
.
STORAGE
,
1
),
neo
.
UP_TO_DATE
}}},
{
0
,
[]
neo
.
CellInfo
{{
neo
.
UUID
(
neo
.
STORAGE
,
1
),
neo
.
UP_TO_DATE
}}},
...
@@ -461,7 +461,7 @@ func TestMasterStorage(t *testing.T) {
...
@@ -461,7 +461,7 @@ func TestMasterStorage(t *testing.T) {
Tid
:
xid1
.
Tid
,
Tid
:
xid1
.
Tid
,
Serial
:
neo
.
INVALID_TID
,
Serial
:
neo
.
INVALID_TID
,
}))
}))
tc
.
Expect
(
conntx
(
"s:3"
,
"c:2"
,
3
,
&
neo
.
Answer
Get
Object
{
tc
.
Expect
(
conntx
(
"s:3"
,
"c:2"
,
3
,
&
neo
.
AnswerObject
{
Oid
:
xid1
.
Oid
,
Oid
:
xid1
.
Oid
,
Serial
:
serial1
,
Serial
:
serial1
,
NextSerial
:
0
,
// XXX
NextSerial
:
0
,
// XXX
...
...
go/neo/server/master.go
View file @
19dd539e
...
@@ -691,7 +691,7 @@ func storCtlVerify(ctx context.Context, stor *neo.Node, pt *neo.PartitionTable,
...
@@ -691,7 +691,7 @@ func storCtlVerify(ctx context.Context, stor *neo.Node, pt *neo.PartitionTable,
defer
task
.
Runningf
(
&
ctx
,
"%s: stor verify"
,
slink
)(
&
err
)
defer
task
.
Runningf
(
&
ctx
,
"%s: stor verify"
,
slink
)(
&
err
)
// send just recovered parttab so storage saves it
// send just recovered parttab so storage saves it
err
=
slink
.
Send1
(
&
neo
.
Notify
PartitionTable
{
err
=
slink
.
Send1
(
&
neo
.
Send
PartitionTable
{
PTid
:
pt
.
PTid
,
PTid
:
pt
.
PTid
,
RowList
:
pt
.
Dump
(),
RowList
:
pt
.
Dump
(),
})
})
...
...
go/neo/server/storage.go
View file @
19dd539e
...
@@ -265,7 +265,7 @@ func (stor *Storage) m1initialize(ctx context.Context, mlink *neo.NodeLink) (req
...
@@ -265,7 +265,7 @@ func (stor *Storage) m1initialize(ctx context.Context, mlink *neo.NodeLink) (req
err
=
req
.
Reply
(
&
neo
.
AnswerLastIDs
{
LastTid
:
lastTid
,
LastOid
:
lastOid
})
err
=
req
.
Reply
(
&
neo
.
AnswerLastIDs
{
LastTid
:
lastTid
,
LastOid
:
lastOid
})
case
*
neo
.
Notify
PartitionTable
:
case
*
neo
.
Send
PartitionTable
:
// TODO M sends us whole PT -> save locally
// TODO M sends us whole PT -> save locally
case
*
neo
.
NotifyPartitionChanges
:
case
*
neo
.
NotifyPartitionChanges
:
...
@@ -332,7 +332,7 @@ func (stor *Storage) m1serve(ctx context.Context, reqStart *neo.Request) (err er
...
@@ -332,7 +332,7 @@ func (stor *Storage) m1serve(ctx context.Context, reqStart *neo.Request) (err er
case
*
neo
.
StopOperation
:
case
*
neo
.
StopOperation
:
return
fmt
.
Errorf
(
"stop requested"
)
return
fmt
.
Errorf
(
"stop requested"
)
// XXX
Notify
PartitionTable?
// XXX
Send
PartitionTable?
// XXX NotifyPartitionChanges?
// XXX NotifyPartitionChanges?
case
*
neo
.
NotifyNodeInformation
:
case
*
neo
.
NotifyNodeInformation
:
...
@@ -479,7 +479,7 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
...
@@ -479,7 +479,7 @@ func (stor *Storage) serveClient1(ctx context.Context, req neo.Msg) (resp neo.Ms
return
neo
.
ErrEncode
(
err
)
return
neo
.
ErrEncode
(
err
)
}
}
return
&
neo
.
Answer
Get
Object
{
return
&
neo
.
AnswerObject
{
Oid
:
xid
.
Oid
,
Oid
:
xid
.
Oid
,
Serial
:
tid
,
Serial
:
tid
,
...
...
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