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
375efa1e
Commit
375efa1e
authored
Nov 08, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f44b8da3
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
74 deletions
+74
-74
go/zodb/storage/fs1/filestorage.go
go/zodb/storage/fs1/filestorage.go
+1
-2
go/zodb/storage/fs1/format.go
go/zodb/storage/fs1/format.go
+68
-70
go/zodb/storage/fs1/fs1tools/dump.go
go/zodb/storage/fs1/fs1tools/dump.go
+3
-1
go/zodb/storage/fs1/py/gen-testdata
go/zodb/storage/fs1/py/gen-testdata
+2
-1
No files found.
go/zodb/storage/fs1/filestorage.go
View file @
375efa1e
...
...
@@ -124,14 +124,13 @@ func (e *ErrXidLoad) Error() string {
}
// freelist(DataHeader)
XXX move -> format.go ?
// freelist(DataHeader)
var
dhPool
=
sync
.
Pool
{
New
:
func
()
interface
{}
{
return
&
DataHeader
{}
}}
// DataHeaderAlloc allocates DataHeader from freelist.
func
DataHeaderAlloc
()
*
DataHeader
{
return
dhPool
.
Get
()
.
(
*
DataHeader
)
}
// Free puts dh back into DataHeader freelist.
//
// Caller must not use dh after call to Free.
...
...
go/zodb/storage/fs1/format.go
View file @
375efa1e
This diff is collapsed.
Click to expand it.
go/zodb/storage/fs1/fs1tools/dump.go
View file @
375efa1e
...
...
@@ -29,6 +29,7 @@ import (
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb/storage/fs1"
"lab.nexedi.com/kirr/neo/go/xcommon/xio"
"lab.nexedi.com/kirr/go123/prog"
"lab.nexedi.com/kirr/go123/xbytes"
...
...
@@ -362,7 +363,8 @@ func (d *DumperFsTail) DumpTxn(buf *xfmt.Buffer, it *fs1.Iter) error {
if
err
==
io
.
EOF
{
err
=
io
.
ErrUnexpectedEOF
// XXX -> noEOF(err)
}
return
&
fs1
.
TxnError
{
txnh
.
Pos
,
"read data payload"
,
err
}
// XXX dup wrt fs1.TxnHeader.err
return
&
fs1
.
RecordError
{
xio
.
Name
(
it
.
R
),
"transaction record"
,
txnh
.
Pos
,
"read data payload"
,
err
}
}
// print information about read txn record
...
...
go/zodb/storage/fs1/py/gen-testdata
View file @
375efa1e
...
...
@@ -62,12 +62,13 @@ def main():
txnLenPrev
=
-
1
for
txn
in
stor
.
iterator
():
# txn is TransactionRecord
# txn.extension is already depickled dict - we want to put raw data from file
# also we need to access txn record legth which is not provided by higher-level iterator
# also we need to access txn record le
n
gth which is not provided by higher-level iterator
# do deep-dive into FileStorage
th
=
stor
.
_read_txn_header
(
txn
.
_tpos
)
assert
th
.
tid
==
txn
.
tid
assert
th
.
tlen
==
txn
.
_tend
-
txn
.
_tpos
# fs1/go keeps in RAM whole txn length, not len-8 as it is on disk
txnLen
=
th
.
tlen
+
8
emit
(
"
\
t
{"
)
...
...
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