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
cb13a9f4
Commit
cb13a9f4
authored
Mar 06, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
613dbf6a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
422 additions
and
265 deletions
+422
-265
t/neo/storage/fs1/py/gen-testdata
t/neo/storage/fs1/py/gen-testdata
+19
-10
t/neo/storage/fs1/testdata/1.fs
t/neo/storage/fs1/testdata/1.fs
+0
-0
t/neo/storage/fs1/testdata/1.fs.index
t/neo/storage/fs1/testdata/1.fs.index
+0
-0
t/neo/storage/fs1/testdata_expect_test.go
t/neo/storage/fs1/testdata_expect_test.go
+403
-255
No files found.
t/neo/storage/fs1/py/gen-testdata
View file @
cb13a9f4
...
@@ -97,14 +97,19 @@ def main():
...
@@ -97,14 +97,19 @@ def main():
{
"x-generator"
:
"zodb/py2 (undo %s)"
%
ul
[
"id"
]})
{
"x-generator"
:
"zodb/py2 (undo %s)"
%
ul
[
"id"
]})
# delete an object
# delete an object
#obj = random.choice(root.values())
name
=
random
.
choice
(
root
.
keys
())
#txn = precommit(u"root%i\nYour\nRoyal\nMagesty " % i,
obj
=
root
[
name
]
# u"delete %i\nalpha beta gamma\n\nqqq ..." % i,
root
[
name
]
=
Object
(
"%s%i*"
%
(
name
,
i
))
# {"x-generator": "zodb/py2 (delete %s)" % hex64(obj._p_oid)})
# NOTE user/ext are kept empty on purpose - to also test this case
#stor.tpc_begin(txn)
commit
(
u""
,
u"predelete %s"
%
unpack64
(
obj
.
_p_oid
),
{})
#stor.deleteObject(obj._p_oid, obj._p_serial, txn)
#stor.tpc_vote(txn)
txn
=
precommit
(
u"root%i
\
n
Your
\
n
Royal
\
n
Magesty "
%
i
,
#stor.tpc_finish(txn)
u"delete %i
\
n
alpha beta gamma
\
n
\
n
qqq ..."
%
i
,
{
"x-generator"
:
"zodb/py2 (delete %s)"
%
unpack64
(
obj
.
_p_oid
)})
stor
.
tpc_begin
(
txn
)
stor
.
deleteObject
(
obj
.
_p_oid
,
obj
.
_p_serial
,
txn
)
stor
.
tpc_vote
(
txn
)
stor
.
tpc_finish
(
txn
)
# close db & rest not to get conflict errors after we touched stor
# close db & rest not to get conflict errors after we touched stor
# directly a bit. everything will be reopened on next iteration.
# directly a bit. everything will be reopened on next iteration.
...
@@ -188,8 +193,12 @@ def main():
...
@@ -188,8 +193,12 @@ def main():
plen
=
dh
.
plen
plen
=
dh
.
plen
if
plen
==
0
:
if
plen
==
0
:
rawdata
=
p64
(
dh
.
back
)
# back-pointer or 0 (= delete)
rawdata
=
p64
(
dh
.
back
)
# back-pointer or 0 (= delete)
data
=
"[]byte(%s)"
%
escapeqq
(
drec
.
data
)
if
drec
.
data
is
None
:
datatid
=
hex64
(
drec
.
data_txn
)
# XXX vs .data = None ?
data
=
"/* deleted */ nil"
datatid
=
"/* deleted */ 0"
else
:
data
=
"[]byte(%s)"
%
escapeqq
(
drec
.
data
)
datatid
=
hex64
(
drec
.
data_txn
)
else
:
else
:
rawdata
=
drec
.
data
rawdata
=
drec
.
data
data
=
"/* same as ^^^ */ nil"
data
=
"/* same as ^^^ */ nil"
...
...
t/neo/storage/fs1/testdata/1.fs
View file @
cb13a9f4
No preview for this file type
t/neo/storage/fs1/testdata/1.fs.index
View file @
cb13a9f4
No preview for this file type
t/neo/storage/fs1/testdata_expect_test.go
View file @
cb13a9f4
This diff is collapsed.
Click to expand it.
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