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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
43cab1eb
Commit
43cab1eb
authored
May 04, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4a1c56ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
20 deletions
+100
-20
go/NOTES
go/NOTES
+1
-1
go/neo/master.go
go/neo/master.go
+9
-2
go/neo/proto.go
go/neo/proto.go
+1
-17
go/nodetab.go
go/nodetab.go
+31
-0
go/parttab.go
go/parttab.go
+58
-0
No files found.
go/NOTES
View file @
43cab1eb
...
...
@@ -381,7 +381,7 @@ Partition Table (general & current-py)
#Np (how-many partitions) #R (replication factor)
Cell
.node (-> .nodeid, .addr)
.state
.
cell_
state
.backup_tid # last tid this cell has all data for
.replicating # currently replicating up to this (.replicating) tid
...
...
go/neo/master.go
View file @
43cab1eb
...
...
@@ -34,11 +34,18 @@ type Master struct {
}
func
NewMaster
(
clusterName
string
)
*
Master
{
return
&
Master
{
clusterName
}
// XXX .clusterState = RECOVERING ?
m
:=
&
Master
{
clusterName
}
m
.
SetClusterState
(
RECOVERING
)
// XXX no elections - we are the only master
return
m
}
func
(
m
*
Master
)
SetClusterState
(
state
ClusterState
)
{
m
.
clusterState
=
state
// XXX actions ?
}
// ServeLink serves incoming node-node link connection
// XXX +error return?
func
(
m
*
Master
)
ServeLink
(
ctx
context
.
Context
,
link
*
NodeLink
)
{
...
...
go/neo/proto.go
View file @
43cab1eb
...
...
@@ -222,7 +222,7 @@ func float64_NEODecode(b []byte) float64 {
return
math
.
Float64frombits
(
fu
)
}
// N
OTE original NodeList = []NodeInfo
// N
odeInfo is information about a node
type
NodeInfo
struct
{
NodeType
Address
...
...
@@ -244,22 +244,6 @@ type RowInfo struct {
}
type
XXXTest
struct
{
qqq
uint32
aaa
uint32
Zzz
map
[
int32
]
string
}
// // XXX link request <-> answer ?
// // XXX naming -> PktHeader ?
// type PktHead struct {
// ConnId be32 // NOTE is .msgid in py
// MsgCode be16
// Len be32 // whole packet length (including header)
// }
// General purpose notification (remote logging)
type
Notify
struct
{
...
...
go/nodetab.go
0 → 100644
View file @
43cab1eb
// Copyright (C) 2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// You can also Link and Combine this program with other software covered by
// the terms of any of the Open Source Initiative approved licenses and Convey
// the resulting work. Corresponding source of such a combination shall include
// the source code for all other software used.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
package
neo
// node management & node table
// Node represents a node from local-node point of view
type
Node
struct
{
Info
NodeInfo
Link
*
NodeLink
// link to this node; =nil if not connected
}
// NodeTable represents all known nodes in a cluster from local-node point of view
type
NodeTable
struct
{
}
go/parttab.go
0 → 100644
View file @
43cab1eb
// Copyright (C) 2017 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// option) any later version, as published by the Free Software Foundation.
//
// You can also Link and Combine this program with other software covered by
// the terms of any of the Open Source Initiative approved licenses and Convey
// the resulting work. Corresponding source of such a combination shall include
// the source code for all other software used.
//
// This program is distributed WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See COPYING file for full licensing terms.
package
neo
// partition table
// PartitionTable represents object space partitioning in a cluster
//
// XXX description:
//
// #Np (how-many partitions) #R (replication factor)
// Cell
// .node (-> .nodeid, .addr)
// .cell_state
//
// .backup_tid # last tid this cell has all data for
// .replicating # currently replicating up to this (.replicating) tid
//
// PT
// .id↑
// .partition_list [#Np] of []Cell
// .count_dict {} node -> #node_used_in_pt
//
//
// Pt
// +-+
// | |
// +-+ +----------+ +------------+ +-----+
// | | |node,state| |node2,state2| |cell3| ...
// +-+ +----------+ +------------+ +-----+
// Np | |
// +-+
// | |
// +-+ oid -> PTentry (as PT[oid % Np]
// | | tid
// +-+
type
PartitionTable
struct
{
ptTab
[]
...
}
// Operational returns whether all object space is covered by at least some ready-to-serve nodes
func
(
pt
*
PartitionalTable
)
Operational
()
bool
{
}
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