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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
40256267
Commit
40256267
authored
Aug 23, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9a4646be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
go/neo/client/cache.go
go/neo/client/cache.go
+11
-11
No files found.
go/neo/client/cache.go
View file @
40256267
...
...
@@ -260,14 +260,15 @@ func (c *cache) Load(xid zodb.Xid) (data []byte, tid Tid, err error) {
// if rce & rceNext cover the same range -> drop rce
if
i
+
1
<
len
(
oce
.
revv
)
{
rceNext
:=
oce
.
revv
[
i
+
1
]
if
rceNext
.
loaded
()
&&
rceNext
.
serial
<
rce
.
before
{
// XXX rceNext.serial=0 ?
if
rceNext
.
loaded
()
&&
rceNext
.
err
==
nil
&&
rceNext
.
serial
<
rce
.
before
{
// drop rce
oce
.
deli
(
i
)
δsize
-=
len
(
rce
.
data
)
// verify rce.serial == rceNext.serial
if
rce
.
serial
!=
rceNext
.
serial
{
rce
.
errDB
(
xid
.
Oid
,
"load(<%v) -> %v; load(<%v) -> %v"
,
rce
.
before
,
rce
.
serial
,
rceNext
.
before
,
rceNext
.
serial
)
if
rce
.
err
==
nil
&&
rce
.
serial
!=
rceNext
.
serial
{
rce
.
errDB
(
xid
.
Oid
,
"load(<%v) -> %v; load(<%v) -> %v"
,
rce
.
before
,
rce
.
serial
,
rceNext
.
before
,
rceNext
.
serial
)
}
rce
=
rceNext
...
...
@@ -277,17 +278,16 @@ func (c *cache) Load(xid zodb.Xid) (data []byte, tid Tid, err error) {
// if rcePrev & rce cover the same range -> drop rcePrev
if
i
>
0
{
rcePrev
=
oce
.
revv
[
i
-
1
]
if
rce
.
serial
<
rcePrev
.
before
{
// XXX drop rcePrev here?
// verify rce.serial == rcePrev.serial (if that is ready)
if
rcePrev
.
loaded
()
&&
rcePrev
.
serial
!=
rce
.
serial
{
// XXX rcePrev.serial=0 ?
rce
.
errDB
(
xid
.
Oid
,
"load(<%v) -> %v; load(<%v) -> %v"
,
rcePrev
.
before
,
rcePrev
.
serial
,
rce
.
before
,
rce
.
serial
)
}
if
rcePrev
.
loaded
()
&&
rce
.
err
==
nil
&&
rce
.
serial
<
rcePrev
.
before
{
// drop rcePrev
oce
.
deli
(
i
-
1
)
δsize
-=
len
(
rcePrev
.
data
)
// verify rce.serial == rcePrev.serial
if
rcePrev
.
err
==
nil
&&
rcePrev
.
serial
!=
rce
.
serial
{
rce
.
errDB
(
xid
.
Oid
,
"load(<%v) -> %v; load(<%v) -> %v"
,
rcePrev
.
before
,
rcePrev
.
serial
,
rce
.
before
,
rce
.
serial
)
}
}
}
...
...
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