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
99036f9c
Commit
99036f9c
authored
Mar 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
49434236
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
go/zodb/db.go
go/zodb/db.go
+1
-4
go/zodb/storage/fs1/filestorage_test.go
go/zodb/storage/fs1/filestorage_test.go
+5
-5
No files found.
go/zodb/db.go
View file @
99036f9c
...
...
@@ -382,14 +382,11 @@ func (db *DB) Open(ctx context.Context, opt *ConnOptions) (_ *Connection, err er
at
=
db
.
δtail
.
Head
()
db
.
mu
.
Unlock
()
}
else
{
// sync storage for lastTid
var
err
error
// sync storage for head
err
=
db
.
stor
.
Sync
(
ctx
)
if
err
!=
nil
{
return
nil
,
err
}
at
=
db
.
stor
.
Head
()
}
}
...
...
go/zodb/storage/fs1/filestorage_test.go
View file @
99036f9c
...
...
@@ -462,7 +462,7 @@ func TestOpenRecovery(t *testing.T) {
X
:=
exc
.
Raiseif
main
,
err
:=
ioutil
.
ReadFile
(
"testdata/1.fs"
);
X
(
err
)
index
,
err
:=
ioutil
.
ReadFile
(
"testdata/1.fs.index"
);
X
(
err
)
lastTi
dOk
:=
_1fs_dbEntryv
[
len
(
_1fs_dbEntryv
)
-
1
]
.
Header
.
Tid
hea
dOk
:=
_1fs_dbEntryv
[
len
(
_1fs_dbEntryv
)
-
1
]
.
Header
.
Tid
topPos
:=
int64
(
_1fs_indexTopPos
)
voteTail
,
err
:=
ioutil
.
ReadFile
(
"testdata/1voted.tail"
);
X
(
err
)
...
...
@@ -495,12 +495,12 @@ func TestOpenRecovery(t *testing.T) {
defer
func
()
{
err
=
fs
.
Close
();
X
(
err
)
}()
if
at0
!=
lastTi
dOk
{
t
.
Fatalf
(
"at0: %s ; expected: %s"
,
at0
,
lastTi
dOk
)
if
at0
!=
hea
dOk
{
t
.
Fatalf
(
"at0: %s ; expected: %s"
,
at0
,
hea
dOk
)
}
head
,
err
:=
fs
.
Sync
(
ctx
);
X
(
err
)
if
head
!=
lastTi
dOk
{
t
.
Fatalf
(
"head: %s ; expected: %s"
,
head
,
lastTi
dOk
)
if
head
!=
hea
dOk
{
t
.
Fatalf
(
"head: %s ; expected: %s"
,
head
,
hea
dOk
)
}
})
}
...
...
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