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
8ee4675a
Commit
8ee4675a
authored
Mar 20, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a059779e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
go/zodb/storage/demo/demo.go
go/zodb/storage/demo/demo.go
+6
-2
No files found.
go/zodb/storage/demo/demo.go
View file @
8ee4675a
...
@@ -38,7 +38,11 @@ import (
...
@@ -38,7 +38,11 @@ import (
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb"
)
)
// XXX
// Storage combines base and δ storages as if δ transactional log is logically
// appended to base.
//
// Base must remain unmodified, and all δ transactions must be with TIDs
// strictly after base.Head .
type
Storage
struct
{
type
Storage
struct
{
base
zodb
.
IStorageDriver
base
zodb
.
IStorageDriver
δ
zodb
.
IStorageDriver
δ
zodb
.
IStorageDriver
...
@@ -74,7 +78,7 @@ func (e *baseError) Error() string {
...
@@ -74,7 +78,7 @@ func (e *baseError) Error() string {
func
(
e
*
baseError
)
Cause
()
error
{
return
e
.
err
}
func
(
e
*
baseError
)
Cause
()
error
{
return
e
.
err
}
func
(
e
*
baseError
)
Unwrap
()
error
{
return
e
.
err
}
func
(
e
*
baseError
)
Unwrap
()
error
{
return
e
.
err
}
// watcher detects base mutation and proxies δ events to user.
// watcher detects base mutation and proxies δ events to user
watchq
.
// it runs as separate goroutine.
// it runs as separate goroutine.
func
(
d
*
Storage
)
watcher
(
ctx
context
.
Context
)
error
{
func
(
d
*
Storage
)
watcher
(
ctx
context
.
Context
)
error
{
if
d
.
watchq
!=
nil
{
if
d
.
watchq
!=
nil
{
...
...
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