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
272f6c71
Commit
272f6c71
authored
Jul 26, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
61b6ca9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
go/zodb/storage/fs1/filestorage.go
go/zodb/storage/fs1/filestorage.go
+1
-0
go/zodb/storage/fs1/fs1tools/dump.go
go/zodb/storage/fs1/fs1tools/dump.go
+17
-7
No files found.
go/zodb/storage/fs1/filestorage.go
View file @
272f6c71
...
@@ -88,6 +88,7 @@ type TxnHeader struct {
...
@@ -88,6 +88,7 @@ type TxnHeader struct {
LenPrev
int64
// whole previous transaction record length
LenPrev
int64
// whole previous transaction record length
// (-1 if there is no previous txn record) XXX see rules in Load
// (-1 if there is no previous txn record) XXX see rules in Load
Len
int64
// whole transaction record length XXX see rules in Load
Len
int64
// whole transaction record length XXX see rules in Load
// ^^^ FIXME make Len be raw len as stored on disk (currently it is len-on-disk + 8)
// transaction metadata itself
// transaction metadata itself
zodb
.
TxnInfo
zodb
.
TxnInfo
...
...
go/zodb/storage/fs1/fs1tools/dump.go
View file @
272f6c71
...
@@ -218,24 +218,34 @@ func (d *DumperFsDumpVerbose) DumpTxn(buf *xfmt.Buffer, it *fs1.Iter) error {
...
@@ -218,24 +218,34 @@ func (d *DumperFsDumpVerbose) DumpTxn(buf *xfmt.Buffer, it *fs1.Iter) error {
buf
.
S
(
"="
)
buf
.
S
(
"="
)
}
}
buf
.
S
(
"
\n
offset: "
)
.
D64
(
txnh
.
Pos
)
buf
.
S
(
"
\n
offset: "
)
.
D64
(
txnh
.
Pos
)
buf
.
S
(
"
\n
end pos: "
)
.
D64
(
txnh
.
Pos
+
txnh
.
Len
)
buf
.
S
(
"
\n
end pos: "
)
.
D64
(
txnh
.
Pos
+
txnh
.
Len
/* py does not account for redundant len size */
-
8
)
buf
.
S
(
"
\n
transaction id: "
)
.
V
(
txnh
.
Tid
)
buf
.
S
(
"
\n
transaction id: "
)
.
V
(
txnh
.
Tid
)
buf
.
S
(
"
\n
trec len: "
)
.
D64
(
txnh
.
Len
)
buf
.
S
(
"
\n
trec len: "
)
.
D64
(
txnh
.
Len
/* py len ^^^ */
-
8
)
buf
.
S
(
"
\n
status: "
)
.
Qpycb
(
byte
(
txnh
.
Status
))
buf
.
S
(
"
\n
status: "
)
.
Qpycb
(
byte
(
txnh
.
Status
))
buf
.
S
(
"
\n
user: "
)
.
Qpyb
(
txnh
.
User
)
buf
.
S
(
"
\n
user: "
)
.
Qpyb
(
txnh
.
User
)
buf
.
S
(
"
\n
description: "
)
.
Qpyb
(
txnh
.
Description
)
buf
.
S
(
"
\n
description: "
)
.
Qpyb
(
txnh
.
Description
)
buf
.
S
(
"
\n
len(extra): "
)
.
D
(
len
(
txnh
.
Extension
))
buf
.
S
(
"
\n
len(extra): "
)
.
D
(
len
(
txnh
.
Extension
))
buf
.
S
(
"
\n
"
)
buf
.
S
(
"
\n
"
)
err
:=
d
.
dumpData
(
buf
,
it
)
for
{
if
err
!=
nil
{
err
:=
it
.
NextData
()
return
err
if
err
!=
nil
{
if
err
==
io
.
EOF
{
break
}
return
err
}
err
=
d
.
dumpData
(
buf
,
it
)
if
err
!=
nil
{
return
err
}
}
}
// NOTE printing the same .Len twice
// NOTE printing the same .Len twice
// we do not print/check redundant len here because our
// we do not print/check redundant len here because our
// FileStorage code checks/reports this itself
// FileStorage code checks/reports this itself
buf
.
S
(
"redundant trec len: "
)
.
D64
(
it
.
Txnh
.
Len
)
.
S
(
"
\n
"
)
buf
.
S
(
"redundant trec len: "
)
.
D64
(
it
.
Txnh
.
Len
/* py len ^^^ */
-
8
)
.
S
(
"
\n
"
)
return
nil
return
nil
}
}
...
@@ -254,7 +264,7 @@ func (d *DumperFsDumpVerbose) dumpData(buf *xfmt.Buffer, it *fs1.Iter) error {
...
@@ -254,7 +264,7 @@ func (d *DumperFsDumpVerbose) dumpData(buf *xfmt.Buffer, it *fs1.Iter) error {
if
dh
.
DataLen
==
0
{
if
dh
.
DataLen
==
0
{
backPos
,
err
:=
dh
.
LoadBackRef
(
it
.
R
)
backPos
,
err
:=
dh
.
LoadBackRef
(
it
.
R
)
if
err
!=
nil
{
if
err
!=
nil
{
// XXX
return
err
// XXX err ctx
}
}
buf
.
S
(
"
\n
backpointer: "
)
.
D64
(
backPos
)
buf
.
S
(
"
\n
backpointer: "
)
.
D64
(
backPos
)
...
...
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