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
e627c220
Commit
e627c220
authored
May 21, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bff54f83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
go/neo/master.go
go/neo/master.go
+4
-0
go/neo/parttab.go
go/neo/parttab.go
+27
-2
No files found.
go/neo/master.go
View file @
e627c220
...
...
@@ -145,6 +145,10 @@ func (m *Master) ServeLink(ctx context.Context, link *NodeLink) {
// >NotifyPartitionTable (ptid=1, `node 0: S1, R`)
// # S saves PT info locally XXX -> after StartOperation ?
//
//
// VERIFICATION (master.verification.py)
// ------------
//
// # M asks about unfinished transactions
// >AskLockedTransactions
// <AnswerLockedTransactions {} ttid -> tid # in example we have empty
...
...
go/neo/parttab.go
View file @
e627c220
...
...
@@ -107,7 +107,7 @@ package neo
type
PartitionTable
struct
{
// XXX do we need sync.Mutex here for updates ?
ptTab
[]
PartitionCell
// [#Np]
ptTab
[]
[]
PartitionCell
// [#Np]
ptId
int
// ↑ for versioning XXX -> ver ?
}
...
...
@@ -131,6 +131,31 @@ type PartitionCell struct {
// Operational returns whether all object space is covered by at least some ready-to-serve nodes
// NOTE XXX operational here means only pt itself is operational
// for cluster to be really operational it has to be checked whether
// nodes referenced by pt are up and running
//
// XXX or keep not only NodeID in PartitionCell - add *Node ?
func
(
pt
*
PartitionTable
)
Operational
()
bool
{
panic
(
"TODO"
)
for
ptEntry
:=
range
pt
.
ptTab
{
if
len
(
ptEntry
)
==
0
{
return
false
}
ok
:=
false
cellLoop
:
for
cell
:=
range
ptEntry
{
switch
cell
.
CellState
{
case
UP_TO_DATE
,
FEEDING
:
// XXX cell.isReadble in py
ok
=
true
break
cellLoop
}
}
if
!
ok
{
return
false
}
}
return
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