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
702c62e4
Commit
702c62e4
authored
Dec 18, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
dc1ad0d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
28 deletions
+17
-28
go/zodb/storage/fs1/filestorage.go
go/zodb/storage/fs1/filestorage.go
+2
-18
go/zodb/storage/fs1/filestorage_test.go
go/zodb/storage/fs1/filestorage_test.go
+15
-10
No files found.
go/zodb/storage/fs1/filestorage.go
View file @
702c62e4
...
...
@@ -623,24 +623,6 @@ mainloop:
}
}
/*
// XXX doc
func (fs *FileStorage) Watch(ctx context.Context) (_ zodb.Tid, _ []zodb.Oid, err error) {
defer xerr.Contextf(&err, "%s: watch", fs.file.Name())
select {
case <-ctx.Done():
return zodb.InvalidTid, nil, ctx.Err()
case <-fs.down:
return zodb.InvalidTid, nil, os.ErrClosed // FIXME -> proper error
case w := <-fs.watchq:
return w.tid, w.oidv, nil
}
}
*/
// --- open + rebuild index ---
func
(
fs
*
FileStorage
)
shutdown
()
{
...
...
@@ -652,6 +634,8 @@ func (fs *FileStorage) shutdown() {
func
(
fs
*
FileStorage
)
Close
()
error
{
fs
.
shutdown
()
// XXX wait for watcher?
if
fs
.
errClose
!=
nil
{
return
&
zodb
.
OpError
{
URL
:
fs
.
URL
(),
Op
:
"close"
,
Args
:
nil
,
Err
:
fs
.
errClose
}
}
...
...
go/zodb/storage/fs1/filestorage_test.go
View file @
702c62e4
...
...
@@ -354,14 +354,14 @@ func BenchmarkIterate(b *testing.B) {
b
.
StopTimer
()
}
// XXX kill
var
tracef
=
func
(
format
string
,
argv
...
interface
{})
{
log
.
Printf
(
"W "
+
format
,
argv
...
)
}
func
init
()
{
log
.
SetFlags
(
log
.
Lmicroseconds
)
}
//
//
XXX kill
//
var tracef = func(format string, argv ...interface{}) {
//
log.Printf("W " + format, argv...)
//
}
//
//
func init() {
//
log.SetFlags(log.Lmicroseconds)
//
}
...
...
@@ -412,8 +412,8 @@ func TestWatch(t *testing.T) {
}
xcommit
:=
func
(
at
zodb
.
Tid
,
objv
...
Object
)
zodb
.
Tid
{
tracef
(
"-> xcommit %s"
,
at
)
defer
tracef
(
"<- xcommit"
)
//
tracef("-> xcommit %s", at)
//
defer tracef("<- xcommit")
t
.
Helper
()
tid
,
err
:=
zcommit
(
at
,
objv
...
)
if
err
!=
nil
{
...
...
@@ -483,3 +483,8 @@ func TestWatch(t *testing.T) {
// t.Fatalf("watch after close -> %v; want: cause %v", err, eWant)
//}
}
// TestOpenRecovery verifies how Open handles data file with not-finished voted
// transaction in the end.
func
TestOpenRecovery
(
t
*
testing
.
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