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
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
Levin Zimmermann
neoppod
Commits
01b24b1e
Commit
01b24b1e
authored
Mar 17, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
351d5dfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
go/zodb/storage/demo/demo.go
go/zodb/storage/demo/demo.go
+8
-9
No files found.
go/zodb/storage/demo/demo.go
View file @
01b24b1e
...
@@ -19,15 +19,10 @@
...
@@ -19,15 +19,10 @@
// Package demo provides overlayed storage, similar to DemoStorage in ZODB/py.
// Package demo provides overlayed storage, similar to DemoStorage in ZODB/py.
//
//
// Storage combines base and δ storages as if δ transactional log
wa
s logically
// Storage combines base and δ storages as if δ transactional log
i
s logically
// appended to base.
// appended to base.
//
// XXX
// XXX link to DemoStorage
package
demo
package
demo
// TODO tests
import
(
import
(
"context"
"context"
"errors"
"errors"
...
@@ -52,8 +47,12 @@ type Storage struct {
...
@@ -52,8 +47,12 @@ type Storage struct {
// Close implements zodb.IStorageDriver .
// Close implements zodb.IStorageDriver .
func
(
d
*
Storage
)
Close
()
error
{
func
(
d
*
Storage
)
Close
()
(
err
error
)
{
// XXX errctx?
defer
func
()
{
if
err
!=
nil
{
err
=
&
zodb
.
OpError
{
URL
:
d
.
URL
(),
Op
:
"close"
,
Err
:
err
}
}
}()
err1
:=
d
.
δ
.
Close
()
err1
:=
d
.
δ
.
Close
()
err2
:=
d
.
base
.
Close
()
err2
:=
d
.
base
.
Close
()
...
@@ -65,7 +64,7 @@ func (d *Storage) Close() error {
...
@@ -65,7 +64,7 @@ func (d *Storage) Close() error {
func
(
d
*
Storage
)
Sync
(
ctx
context
.
Context
)
(
head
zodb
.
Tid
,
err
error
)
{
func
(
d
*
Storage
)
Sync
(
ctx
context
.
Context
)
(
head
zodb
.
Tid
,
err
error
)
{
defer
func
()
{
defer
func
()
{
if
err
!=
nil
{
if
err
!=
nil
{
err
=
&
zodb
.
OpError
{
URL
:
d
.
URL
(),
Op
:
"sync"
,
Args
:
xid
,
Err
:
err
}
err
=
&
zodb
.
OpError
{
URL
:
d
.
URL
(),
Op
:
"sync"
,
Err
:
err
}
}
}
}()
}()
...
...
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