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
f4f787ee
Commit
f4f787ee
authored
Dec 27, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X Surprisingly inline struct worked out of the box
parent
bdfc7f26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
t/neo/marshal.go
t/neo/marshal.go
+21
-0
t/neo/proto.go
t/neo/proto.go
+1
-1
No files found.
t/neo/marshal.go
View file @
f4f787ee
...
...
@@ -251,3 +251,24 @@ func (p *NotifyPartitionTable) NEODecode(data []byte) (int, error) {
}
return
0
/* + TODO variable part */
,
nil
}
func
(
p
*
PartitionChanges
)
NEODecode
(
data
[]
byte
)
(
int
,
error
)
{
p
.
PTid
=
BigEndian
.
Uint64
(
data
[
0
:
])
{
l
:=
BigEndian
.
Uint32
(
data
[
8
:
])
data
=
data
[
12
:
]
p
.
CellList
=
make
([]
struct
{
Offset
uint32
UUID
neo
.
UUID
CellState
neo
.
CellState
},
l
)
for
i
:=
0
;
i
<
l
;
i
++
{
a
:=
&
p
.
CellList
[
i
]
a
.
Offset
=
BigEndian
.
Uint32
(
data
[
0
:
])
a
.
UUID
=
int32
(
BigEndian
.
Uint32
(
data
[
4
:
]))
a
.
CellState
=
int32
(
BigEndian
.
Uint32
(
data
[
8
:
]))
data
=
data
[
12
:
]
}
}
return
0
/* + TODO variable part */
,
nil
}
t/neo/proto.go
View file @
f4f787ee
...
...
@@ -286,7 +286,6 @@ type NotifyPartitionTable struct {
RowList
[]
RowInfo
}
/*
// Notify a subset of a partition table. This is used to notify changes.
// PM -> S, C.
type
PartitionChanges
struct
{
...
...
@@ -299,6 +298,7 @@ type PartitionChanges struct {
}
}
/*
// Tell a storage nodes to start an operation. Until a storage node receives
// this message, it must not serve client nodes. PM -> S.
type StartOperation struct {
...
...
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