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
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
Stefane Fermigier
neo
Commits
ab494bf9
Commit
ab494bf9
authored
7 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a5962ea7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
5 deletions
+45
-5
go/zodb/storage/fs1/filestorage.go
go/zodb/storage/fs1/filestorage.go
+43
-4
go/zodb/storage/fs1/index.go
go/zodb/storage/fs1/index.go
+1
-0
go/zodb/wks/wks.go
go/zodb/wks/wks.go
+1
-1
No files found.
go/zodb/storage/fs1/filestorage.go
View file @
ab494bf9
...
...
@@ -17,11 +17,50 @@
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
// Package fs1 implements so-called FileStorage v1 ZODB storage.
// FileStorage is a single file organized as a log of transactions with data changes.
// Package fs1 provides so-called FileStorage v1 ZODB storage.
//
// XXX partly based on code from ZODB ?
// TODO link to format in zodb/py
// FileStorage is a single file organized as a append-only log of transactions
// with data changes. Every transaction record consists of:
//
// - transaction record header represented by TxnHeader,
// - several data records corresponding to modified objects,
// - redundant transaction length at the end of transaction record.
//
// Every data record consists of:
//
// - data record header represented by DataHeader,
// - actual data following the header.
//
// The "actual data" in addition to raw content, can be a back-pointer
// indicating that the actual content should be retrieved from a past revision.
//
// In addition to append-only transaction/data log, an index is automatically
// maintained mapping oid -> latest data record which modified this oid. The
// index is used to implement zodb.IStorage.Load without linear scan.
//
// The data format is bit-to-bit identical to FileStorage format implemented in ZODB/py.
// Please see the following links for original FileStorage format definition:
//
// https://github.com/zopefoundation/ZODB/blob/a89485c1/src/ZODB/FileStorage/format.py
// https://github.com/zopefoundation/ZODB/blob/a89485c1/src/ZODB/fstools.py
//
// The index format is interoperable with ZODB/py (index uses pickles which
// allows various valid encodings of a given object). Please see the following
// links for original FileStorage index definition:
//
// https://github.com/zopefoundation/ZODB/blob/a89485c1/src/ZODB/fsIndex.py
// https://github.com/zopefoundation/ZODB/commit/1bb14faf
//
// Unless one is doing something FileStorage-specific, it is advices not to use
// fs1 package directly, and instead link-in lab.nexedi.com/kirr/neo/go/zodb/wks,
// open storage by zodb.OpenStorageURL and use it by way of zodb.IStorage interface.
//
// The fs1 package exposes all FileStorage data format details and most of
// internal workings so that it is possible to implement FileStorage-specific
// tools.
//
// Please see package lab.nexedi.com/kirr/neo/go/zodb/storage/fs1/fs1tools and
// associated fs1 command for basic tools related to FileStorage maintenance.
package
fs1
import
(
...
...
This diff is collapsed.
Click to expand it.
go/zodb/storage/fs1/index.go
View file @
ab494bf9
...
...
@@ -54,6 +54,7 @@ type Index struct {
*
fsb
.
Tree
}
// IndexNew creates new empty index
func
IndexNew
()
*
Index
{
return
&
Index
{
Tree
:
fsb
.
TreeNew
()}
}
...
...
This diff is collapsed.
Click to expand it.
go/zodb/wks/wks.go
View file @
ab494bf9
...
...
@@ -21,7 +21,7 @@
//
// The only purpose of this package is so that users could import it
//
// import _ "
.../zodb/wks" XXX fixme import path
// import _ "
lab.nexedi.com/kirr/neo/go/zodb/wks"
//
// and this way automatically link in support for file:// neo:// ... and other
// common storages.
...
...
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