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
0bc7132f
Commit
0bc7132f
authored
Feb 21, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b776d01f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
168 additions
and
105 deletions
+168
-105
t/neo/storage/fs1/py/gen-testdata
t/neo/storage/fs1/py/gen-testdata
+8
-3
t/neo/storage/fs1/testdata_expect_test.go
t/neo/storage/fs1/testdata_expect_test.go
+160
-102
No files found.
t/neo/storage/fs1/py/gen-testdata
View file @
0bc7132f
...
...
@@ -98,10 +98,12 @@ def main():
# database records
stor
=
FileStorage
(
outfs
,
read_only
=
True
)
oidPrevPos
=
{}
# oid -> pos of last drec(oid)
emit
(
"
\
n
var _1fs_dbEntryv = [...]dbEntry{"
)
for
txn
in
stor
.
iterator
():
# txn is TransactionRecord
emit
(
"
\
t
TxnHeader{"
)
emit
(
"
\
t
\
t
Tid:
\
t
%s"
%
hex64
(
txn
.
tid
))
emit
(
"
\
t
\
t
Tid:
\
t
%s
,
"
%
hex64
(
txn
.
tid
))
# -> TxnHeader
#txn.tid, txn.status
#.user .description .extension
...
...
@@ -115,7 +117,7 @@ def main():
emit
(
"
\
t
\
t
\
t
Tid:
\
t
%s,"
%
hex64
(
drec
.
tid
))
# drec: .data .prev (=prev_txn) .pos
# PrevDataRecPos
emit
(
"
\
t
\
t
\
t
PrevDataRecPos:
\
t
%i,"
%
oidPrevPos
.
get
(
drec
.
oid
,
0
))
emit
(
"
\
t
\
t
\
t
TxnPos:
\
t
%i,"
%
txn
.
_tpos
)
assert
drec
.
version
==
''
# DataLen
...
...
@@ -123,7 +125,10 @@ def main():
#.data .data_txn
emit
(
"
\
t
\
t
},"
)
emit
(
"
\
t
}"
)
oidPrevPos
[
drec
.
oid
]
=
drec
.
pos
emit
(
"
\
t
},"
)
emit
(
"}"
)
...
...
t/neo/storage/fs1/testdata_expect_test.go
View file @
0bc7132f
...
...
@@ -15,446 +15,504 @@ var _1fs_indexEntryv = [...]indexEntry{
var
_1fs_dbEntryv
=
[
...
]
dbEntry
{
TxnHeader
{
Tid
:
0x0285cbac12c5f933
Tid
:
0x0285cbac12c5f933
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac12c5f933
,
PrevDataRecPos
:
0
,
TxnPos
:
4
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac2a3d70b3
Tid
:
0x0285cbac2a3d70b3
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac2a3d70b3
,
PrevDataRecPos
:
52
,
TxnPos
:
162
,
},
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbac2a3d70b3
,
PrevDataRecPos
:
0
,
TxnPos
:
162
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac2eeeef00
Tid
:
0x0285cbac2eeeef00
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbac2eeeef00
,
PrevDataRecPos
:
367
,
TxnPos
:
444
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac33a06d4c
Tid
:
0x0285cbac33a06d4c
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac33a06d4c
,
PrevDataRecPos
:
230
,
TxnPos
:
589
,
},
DataHeader
{
Oid
:
2
,
Tid
:
0x0285cbac33a06d4c
,
PrevDataRecPos
:
0
,
TxnPos
:
589
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac3851eb99
Tid
:
0x0285cbac3851eb99
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac3851eb99
,
PrevDataRecPos
:
657
,
TxnPos
:
892
,
},
DataHeader
{
Oid
:
3
,
Tid
:
0x0285cbac3851eb99
,
PrevDataRecPos
:
0
,
TxnPos
:
892
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac3d0369e6
Tid
:
0x0285cbac3d0369e6
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac3d0369e6
,
PrevDataRecPos
:
960
,
TxnPos
:
1215
,
},
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbac3d0369e6
,
PrevDataRecPos
:
0
,
TxnPos
:
1215
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac41b4e833
Tid
:
0x0285cbac41b4e833
,
DataHeader
{
Oid
:
2
,
Tid
:
0x0285cbac41b4e833
,
PrevDataRecPos
:
815
,
TxnPos
:
1558
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac46666680
Tid
:
0x0285cbac46666680
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbac46666680
,
PrevDataRecPos
:
512
,
TxnPos
:
1703
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac4b17e4cc
Tid
:
0x0285cbac4b17e4cc
,
DataHeader
{
Oid
:
2
,
Tid
:
0x0285cbac4b17e4cc
,
PrevDataRecPos
:
1626
,
TxnPos
:
1848
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac4fc96319
Tid
:
0x0285cbac4fc96319
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbac4fc96319
,
PrevDataRecPos
:
1481
,
TxnPos
:
1993
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac547ae166
Tid
:
0x0285cbac547ae166
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac547ae166
,
PrevDataRecPos
:
1283
,
TxnPos
:
2138
,
},
DataHeader
{
Oid
:
5
,
Tid
:
0x0285cbac547ae166
,
PrevDataRecPos
:
0
,
TxnPos
:
2138
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac592c5fb3
Tid
:
0x0285cbac592c5fb3
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac592c5fb3
,
PrevDataRecPos
:
2206
,
TxnPos
:
2501
,
},
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbac592c5fb3
,
PrevDataRecPos
:
0
,
TxnPos
:
2501
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac5dddde00
Tid
:
0x0285cbac5dddde00
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbac5dddde00
,
PrevDataRecPos
:
2061
,
TxnPos
:
2887
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac628f5c4c
Tid
:
0x0285cbac628f5c4c
,
DataHeader
{
Oid
:
3
,
Tid
:
0x0285cbac628f5c4c
,
PrevDataRecPos
:
1138
,
TxnPos
:
3035
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac6740da99
Tid
:
0x0285cbac6740da99
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbac6740da99
,
PrevDataRecPos
:
1771
,
TxnPos
:
3183
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac6bf258e6
Tid
:
0x0285cbac6bf258e6
,
DataHeader
{
Oid
:
5
,
Tid
:
0x0285cbac6bf258e6
,
PrevDataRecPos
:
2424
,
TxnPos
:
3331
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac70a3d733
Tid
:
0x0285cbac70a3d733
,
DataHeader
{
Oid
:
3
,
Tid
:
0x0285cbac70a3d733
,
PrevDataRecPos
:
3105
,
TxnPos
:
3479
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac75555580
Tid
:
0x0285cbac75555580
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbac75555580
,
PrevDataRecPos
:
2809
,
TxnPos
:
3627
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac7a06d3cc
Tid
:
0x0285cbac7a06d3cc
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbac7a06d3cc
,
PrevDataRecPos
:
3697
,
TxnPos
:
3775
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac7eb85219
Tid
:
0x0285cbac7eb85219
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbac7eb85219
,
PrevDataRecPos
:
3253
,
TxnPos
:
3923
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac8369d066
Tid
:
0x0285cbac8369d066
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbac8369d066
,
PrevDataRecPos
:
3845
,
TxnPos
:
4071
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac881b4eb3
Tid
:
0x0285cbac881b4eb3
,
DataHeader
{
Oid
:
2
,
Tid
:
0x0285cbac881b4eb3
,
PrevDataRecPos
:
1916
,
TxnPos
:
4219
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac8ccccd00
Tid
:
0x0285cbac8ccccd00
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbac8ccccd00
,
PrevDataRecPos
:
3993
,
TxnPos
:
4367
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac917e4b4c
Tid
:
0x0285cbac917e4b4c
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbac917e4b4c
,
PrevDataRecPos
:
4141
,
TxnPos
:
4515
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac962fc999
Tid
:
0x0285cbac962fc999
,
DataHeader
{
Oid
:
5
,
Tid
:
0x0285cbac962fc999
,
PrevDataRecPos
:
3401
,
TxnPos
:
4663
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac9ae147e6
Tid
:
0x0285cbac9ae147e6
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbac9ae147e6
,
PrevDataRecPos
:
2957
,
TxnPos
:
4811
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbac9f92c633
Tid
:
0x0285cbac9f92c633
,
DataHeader
{
Oid
:
0
,
Tid
:
0x0285cbac9f92c633
,
PrevDataRecPos
:
2571
,
TxnPos
:
4959
,
},
DataHeader
{
Oid
:
7
,
Tid
:
0x0285cbac9f92c633
,
PrevDataRecPos
:
0
,
TxnPos
:
4959
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbaca4444480
Tid
:
0x0285cbaca4444480
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbaca4444480
,
PrevDataRecPos
:
4881
,
TxnPos
:
5365
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbaca8f5c2cc
Tid
:
0x0285cbaca8f5c2cc
,
DataHeader
{
Oid
:
5
,
Tid
:
0x0285cbaca8f5c2cc
,
PrevDataRecPos
:
4733
,
TxnPos
:
5513
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacada74119
Tid
:
0x0285cbacada74119
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbacada74119
,
PrevDataRecPos
:
4585
,
TxnPos
:
5661
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacb258bf66
Tid
:
0x0285cbacb258bf66
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbacb258bf66
,
PrevDataRecPos
:
5731
,
TxnPos
:
5809
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacb70a3db3
Tid
:
0x0285cbacb70a3db3
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbacb70a3db3
,
PrevDataRecPos
:
5435
,
TxnPos
:
5957
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacbbbbbc00
Tid
:
0x0285cbacbbbbbc00
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbacbbbbbc00
,
PrevDataRecPos
:
5879
,
TxnPos
:
6105
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacc06d3a4c
Tid
:
0x0285cbacc06d3a4c
,
DataHeader
{
Oid
:
3
,
Tid
:
0x0285cbacc06d3a4c
,
PrevDataRecPos
:
3549
,
TxnPos
:
6253
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacc51eb899
Tid
:
0x0285cbacc51eb899
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbacc51eb899
,
PrevDataRecPos
:
4437
,
TxnPos
:
6401
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacc9d036e6
Tid
:
0x0285cbacc9d036e6
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbacc9d036e6
,
PrevDataRecPos
:
6027
,
TxnPos
:
6549
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacce81b533
Tid
:
0x0285cbacce81b533
,
DataHeader
{
Oid
:
7
,
Tid
:
0x0285cbacce81b533
,
PrevDataRecPos
:
5287
,
TxnPos
:
6697
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacd3333380
Tid
:
0x0285cbacd3333380
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbacd3333380
,
PrevDataRecPos
:
6471
,
TxnPos
:
6845
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacd7e4b1cc
Tid
:
0x0285cbacd7e4b1cc
,
DataHeader
{
Oid
:
2
,
Tid
:
0x0285cbacd7e4b1cc
,
PrevDataRecPos
:
4289
,
TxnPos
:
6993
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacdc963019
Tid
:
0x0285cbacdc963019
,
DataHeader
{
Oid
:
1
,
Tid
:
0x0285cbacdc963019
,
PrevDataRecPos
:
6915
,
TxnPos
:
7141
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbace147ae66
Tid
:
0x0285cbace147ae66
,
DataHeader
{
Oid
:
5
,
Tid
:
0x0285cbace147ae66
,
PrevDataRecPos
:
5583
,
TxnPos
:
7289
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbace5f92cb3
Tid
:
0x0285cbace5f92cb3
,
DataHeader
{
Oid
:
7
,
Tid
:
0x0285cbace5f92cb3
,
PrevDataRecPos
:
6767
,
TxnPos
:
7437
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbaceaaaab00
Tid
:
0x0285cbaceaaaab00
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbaceaaaab00
,
PrevDataRecPos
:
6619
,
TxnPos
:
7585
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacef5c294c
Tid
:
0x0285cbacef5c294c
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbacef5c294c
,
PrevDataRecPos
:
6175
,
TxnPos
:
7733
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacf40da799
Tid
:
0x0285cbacf40da799
,
DataHeader
{
Oid
:
3
,
Tid
:
0x0285cbacf40da799
,
PrevDataRecPos
:
6323
,
TxnPos
:
7881
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacf8bf25e6
Tid
:
0x0285cbacf8bf25e6
,
DataHeader
{
Oid
:
2
,
Tid
:
0x0285cbacf8bf25e6
,
PrevDataRecPos
:
7063
,
TxnPos
:
8029
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbacfd70a433
Tid
:
0x0285cbacfd70a433
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbacfd70a433
,
PrevDataRecPos
:
7803
,
TxnPos
:
8177
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbad02222280
Tid
:
0x0285cbad02222280
,
DataHeader
{
Oid
:
3
,
Tid
:
0x0285cbad02222280
,
PrevDataRecPos
:
7951
,
TxnPos
:
8325
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbad06d3a0cc
Tid
:
0x0285cbad06d3a0cc
,
DataHeader
{
Oid
:
4
,
Tid
:
0x0285cbad06d3a0cc
,
PrevDataRecPos
:
7655
,
TxnPos
:
8473
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbad0b851f19
Tid
:
0x0285cbad0b851f19
,
DataHeader
{
Oid
:
3
,
Tid
:
0x0285cbad0b851f19
,
PrevDataRecPos
:
8395
,
TxnPos
:
8621
,
},
}
}
,
TxnHeader
{
Tid
:
0x0285cbad10369d66
Tid
:
0x0285cbad10369d66
,
DataHeader
{
Oid
:
6
,
Tid
:
0x0285cbad10369d66
,
PrevDataRecPos
:
8247
,
TxnPos
:
8769
,
},
}
}
,
}
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