Commit ab12d320 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c2a36e9c
...@@ -545,9 +545,9 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic ...@@ -545,9 +545,9 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic
switch obj.(type) { switch obj.(type) {
// ZBlk* should be in cache but without data // ZBlk* should be in cache but without data
case *ZBlk0: case *ZBlk0:
return zodb.PCachePinObject | zodb.PCacheNonTemporal return zodb.PCachePinObject | zodb.PCacheOmitState
case *ZBlk1: case *ZBlk1:
return zodb.PCachePinObject | zodb.PCacheNonTemporal return zodb.PCachePinObject | zodb.PCacheOmitState
// ZBigFile btree index should be in cache with data // ZBigFile btree index should be in cache with data
case *btree.LOBTree: case *btree.LOBTree:
...@@ -557,7 +557,7 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic ...@@ -557,7 +557,7 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic
// don't let ZData to pollute the cache // don't let ZData to pollute the cache
case *ZData: case *ZData:
return zodb.PCacheNonTemporal return zodb.PCacheOmitObject | zodb.PCacheOmitState
// for performance reason we also keep ZBigFile in cache. // for performance reason we also keep ZBigFile in cache.
// //
......
...@@ -44,7 +44,7 @@ func TestZBlk(t *testing.T) { ...@@ -44,7 +44,7 @@ func TestZBlk(t *testing.T) {
X := exc.Raiseif X := exc.Raiseif
assert := require.New(t) assert := require.New(t)
ctx := context.Background() ctx := context.Background()
stor, err := zodb.OpenStorage(ctx, "testdata/zblk.fs", &zodb.OpenOptions{ReadOnly: true}); X(err) stor, err := zodb.Open(ctx, "testdata/zblk.fs", &zodb.OpenOptions{ReadOnly: true}); X(err)
db := zodb.NewDB(stor) db := zodb.NewDB(stor)
defer func() { defer func() {
err := db.Close(); X(err) err := db.Close(); X(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment