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
ab494bf9
Commit
ab494bf9
authored
Jul 24, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a5962ea7
Changes
3
Show 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 @@
...
@@ -17,11 +17,50 @@
// See COPYING file for full licensing terms.
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
// See https://www.nexedi.com/licensing for rationale and options.
// Package fs1 implements so-called FileStorage v1 ZODB storage.
// Package fs1 provides so-called FileStorage v1 ZODB storage.
// FileStorage is a single file organized as a log of transactions with data changes.
//
//
// XXX partly based on code from ZODB ?
// FileStorage is a single file organized as a append-only log of transactions
// TODO link to format in zodb/py
// 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
package
fs1
import
(
import
(
...
...
go/zodb/storage/fs1/index.go
View file @
ab494bf9
...
@@ -54,6 +54,7 @@ type Index struct {
...
@@ -54,6 +54,7 @@ type Index struct {
*
fsb
.
Tree
*
fsb
.
Tree
}
}
// IndexNew creates new empty index
func
IndexNew
()
*
Index
{
func
IndexNew
()
*
Index
{
return
&
Index
{
Tree
:
fsb
.
TreeNew
()}
return
&
Index
{
Tree
:
fsb
.
TreeNew
()}
}
}
...
...
go/zodb/wks/wks.go
View file @
ab494bf9
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
//
//
// The only purpose of this package is so that users could import it
// 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
// and this way automatically link in support for file:// neo:// ... and other
// common storages.
// common storages.
...
...
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