Commit 272f6c71 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 61b6ca9b
......@@ -88,6 +88,7 @@ type TxnHeader struct {
LenPrev int64 // whole previous transaction record length
// (-1 if there is no previous txn record) 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
zodb.TxnInfo
......
......@@ -218,24 +218,34 @@ func (d *DumperFsDumpVerbose) DumpTxn(buf *xfmt.Buffer, it *fs1.Iter) error {
buf .S("=")
}
buf .S("\noffset: ") .D64(txnh.Pos)
buf .S("\nend pos: ") .D64(txnh.Pos + txnh.Len)
buf .S("\nend pos: ") .D64(txnh.Pos + txnh.Len /* py does not account for redundant len size */- 8)
buf .S("\ntransaction id: ") .V(txnh.Tid)
buf .S("\ntrec len: ") .D64(txnh.Len)
buf .S("\ntrec len: ") .D64(txnh.Len /* py len ^^^ */- 8)
buf .S("\nstatus: ") .Qpycb(byte(txnh.Status))
buf .S("\nuser: ") .Qpyb(txnh.User)
buf .S("\ndescription: ") .Qpyb(txnh.Description)
buf .S("\nlen(extra): ") .D(len(txnh.Extension))
buf .S("\n")
err := d.dumpData(buf, it)
for {
err := it.NextData()
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
// we do not print/check redundant len here because our
// 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
}
......@@ -254,7 +264,7 @@ func (d *DumperFsDumpVerbose) dumpData(buf *xfmt.Buffer, it *fs1.Iter) error {
if dh.DataLen == 0 {
backPos, err := dh.LoadBackRef(it.R)
if err != nil {
// XXX
return err // XXX err ctx
}
buf .S("\nbackpointer: ") .D64(backPos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment