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
5fb2be0f
Commit
5fb2be0f
authored
Mar 11, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
39ff832b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
go/zodb/connection.go
go/zodb/connection.go
+1
-2
go/zodb/persistent.go
go/zodb/persistent.go
+4
-4
go/zodb/persistent_test.go
go/zodb/persistent_test.go
+7
-3
No files found.
go/zodb/connection.go
View file @
5fb2be0f
...
@@ -156,8 +156,7 @@ const (
...
@@ -156,8 +156,7 @@ const (
// data access is non-temporal.
// data access is non-temporal.
//
//
// Object state is used once and then won't be used for a long time.
// Object state is used once and then won't be used for a long time.
// There is no reason to preserve object state in cache.
// Don't pollute cache with this object state.
// XXX Don't pollute ...
PCacheNonTemporal
// XXX PCachePolicy ?
PCacheNonTemporal
// XXX PCachePolicy ?
)
)
...
...
go/zodb/persistent.go
View file @
5fb2be0f
...
@@ -262,14 +262,14 @@ func (obj *Persistent) PDeactivate() {
...
@@ -262,14 +262,14 @@ func (obj *Persistent) PDeactivate() {
// no constant load/unload on object access. XXX -> MRU cache?
// no constant load/unload on object access. XXX -> MRU cache?
// NOTE wcfs manages its objects explicitly and does not need this.
// NOTE wcfs manages its objects explicitly and does not need this.
// XXX reenable
/*
if
cc
:=
obj
.
jar
.
cache
.
control
;
cc
!=
nil
{
if
cc
:=
obj
.
jar
.
cache
.
control
;
cc
!=
nil
{
if !cc.WantEvict(obj.instance) {
// XXX catch inconsistency in PCacheClassify result
// XXX locking for .control ?
cp
:=
cc
.
PCacheClassify
(
obj
.
instance
)
if
cp
&
PCacheKeepState
!=
0
{
return
return
}
}
}
}
*/
// already ghost
// already ghost
if
obj
.
state
==
GHOST
{
if
obj
.
state
==
GHOST
{
...
...
go/zodb/persistent_test.go
View file @
5fb2be0f
...
@@ -468,6 +468,10 @@ func testPersistentDB(t0 *testing.T, rawcache bool) {
...
@@ -468,6 +468,10 @@ func testPersistentDB(t0 *testing.T, rawcache bool) {
tdb
:=
testdb
(
t0
,
rawcache
)
tdb
:=
testdb
(
t0
,
rawcache
)
defer
tdb
.
Close
()
defer
tdb
.
Close
()
tdb
.
Add
(
101
,
"bonjour"
)
tdb
.
Add
(
102
,
"monde"
)
tdb
.
Commit
()
at0
:=
tdb
.
head
at0
:=
tdb
.
head
tdb
.
Add
(
101
,
"hello"
)
tdb
.
Add
(
101
,
"hello"
)
...
@@ -694,13 +698,13 @@ func testPersistentDB(t0 *testing.T, rawcache bool) {
...
@@ -694,13 +698,13 @@ func testPersistentDB(t0 *testing.T, rawcache bool) {
t
.
PActivate
(
robj1
)
t
.
PActivate
(
robj1
)
t
.
PActivate
(
robj2
)
t
.
PActivate
(
robj2
)
t
.
checkObj
(
robj1
,
101
,
at0
,
UPTODATE
,
1
,
"
init
"
)
t
.
checkObj
(
robj1
,
101
,
at0
,
UPTODATE
,
1
,
"
bonjour
"
)
t
.
checkObj
(
robj2
,
102
,
at0
,
UPTODATE
,
1
,
"
db
"
)
t
.
checkObj
(
robj2
,
102
,
at0
,
UPTODATE
,
1
,
"
monde
"
)
robj1
.
PDeactivate
()
robj1
.
PDeactivate
()
robj2
.
PDeactivate
()
robj2
.
PDeactivate
()
t
.
checkObj
(
robj1
,
101
,
InvalidTid
,
GHOST
,
0
)
t
.
checkObj
(
robj1
,
101
,
InvalidTid
,
GHOST
,
0
)
t
.
checkObj
(
robj2
,
102
,
at0
,
UPTODATE
,
0
,
"
db
"
)
t
.
checkObj
(
robj2
,
102
,
at0
,
UPTODATE
,
0
,
"
monde
"
)
// Resync ↑ (at0 -> at2; from outside δtail coverage)
// Resync ↑ (at0 -> at2; from outside δtail coverage)
t
.
Abort
()
t
.
Abort
()
...
...
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