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
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
f1b1bda5
Commit
f1b1bda5
authored
Feb 03, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e4a7f75c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
go/neo/storage.go
go/neo/storage.go
+6
-18
No files found.
go/neo/storage.go
View file @
f1b1bda5
...
@@ -320,16 +320,16 @@ func (stor *Storage) m1initialize1(ctx context.Context, req neonet.Request) erro
...
@@ -320,16 +320,16 @@ func (stor *Storage) m1initialize1(ctx context.Context, req neonet.Request) erro
case
*
proto
.
Recovery
:
case
*
proto
.
Recovery
:
err
=
req
.
Reply
(
&
proto
.
AnswerRecovery
{
err
=
req
.
Reply
(
&
proto
.
AnswerRecovery
{
PTid
:
stor
.
node
.
PartTab
.
PTid
,
PTid
:
stor
.
node
.
state
.
PartTab
.
PTid
,
BackupTid
:
proto
.
INVALID_TID
,
BackupTid
:
proto
.
INVALID_TID
,
TruncateTid
:
proto
.
INVALID_TID
})
TruncateTid
:
proto
.
INVALID_TID
})
case
*
proto
.
AskPartitionTable
:
case
*
proto
.
AskPartitionTable
:
// TODO initially read PT from disk
// TODO initially read PT from disk
err
=
req
.
Reply
(
&
proto
.
AnswerPartitionTable
{
err
=
req
.
Reply
(
&
proto
.
AnswerPartitionTable
{
PTid
:
stor
.
node
.
PartTab
.
PTid
,
PTid
:
stor
.
node
.
state
.
PartTab
.
PTid
,
NumReplicas
:
0
,
// FIXME hardcoded; NEO/py uses this as n(replica)-1
NumReplicas
:
0
,
// FIXME hardcoded; NEO/py uses this as n(replica)-1
RowList
:
stor
.
node
.
PartTab
.
Dump
()})
RowList
:
stor
.
node
.
state
.
PartTab
.
Dump
()})
case
*
proto
.
LockedTransactions
:
case
*
proto
.
LockedTransactions
:
// XXX r/o stub
// XXX r/o stub
...
@@ -387,7 +387,7 @@ func (stor *Storage) m1serve(ctx context.Context, reqStart *neonet.Request) (err
...
@@ -387,7 +387,7 @@ func (stor *Storage) m1serve(ctx context.Context, reqStart *neonet.Request) (err
for
{
for
{
// XXX abort on ctx (XXX or upper?)
// XXX abort on ctx (XXX or upper?)
req
,
err
:=
mlink
.
Recv1
()
// XXX -> RecvM1
req
,
err
:=
stor
.
node
.
RecvM1
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -408,18 +408,6 @@ func (stor *Storage) m1serve1(ctx context.Context, req neonet.Request) error {
...
@@ -408,18 +408,6 @@ func (stor *Storage) m1serve1(ctx context.Context, req neonet.Request) error {
case
*
proto
.
StopOperation
:
case
*
proto
.
StopOperation
:
return
fmt
.
Errorf
(
"stop requested"
)
return
fmt
.
Errorf
(
"stop requested"
)
// should be served by Node.commonRecv1
// ---- 8< ----
// XXX SendPartitionTable?
// XXX NotifyPartitionChanges?
case
*
proto
.
NotifyNodeInformation
:
stor
.
node
.
UpdateNodeTab
(
ctx
,
msg
)
// XXX lock?
case
*
proto
.
NotifyClusterState
:
stor
.
node
.
UpdateClusterState
(
ctx
,
msg
)
// XXX lock? what to do with it?
// ---- 8< ----
// TODO commit related messages
// TODO commit related messages
}
}
...
@@ -448,8 +436,8 @@ func (stor *Storage) identify(idReq *proto.RequestIdentification) (proto.Msg, bo
...
@@ -448,8 +436,8 @@ func (stor *Storage) identify(idReq *proto.RequestIdentification) (proto.Msg, bo
}
}
return
&
proto
.
AcceptIdentification
{
return
&
proto
.
AcceptIdentification
{
NodeType
:
stor
.
node
.
M
yInfo
.
Type
,
NodeType
:
stor
.
node
.
m
yInfo
.
Type
,
MyNID
:
stor
.
node
.
M
yInfo
.
NID
,
// XXX lock wrt update
MyNID
:
stor
.
node
.
m
yInfo
.
NID
,
// XXX lock wrt update
YourNID
:
idReq
.
NID
,
YourNID
:
idReq
.
NID
,
},
true
},
true
}
}
...
...
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