Project

General

Profile

Actions

Bug #9333

closed

SharedLRU lookup resurects cleared key

Added by Loïc Dachary over 9 years ago. Updated over 9 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
Category:
common
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The SharedLRU unittests fail on

  ceph::shared_ptr<int> ptr = cache.add(key, new int(value));
  ASSERT_TRUE(cache.lookup(key));
  cache.clear(key);
  ASSERT_FALSE(cache.lookup(key));

The second lookup returns a valid shared_ptr where one would expect it to be cleared from the cache by the previous .clear()

Actions #1

Updated by Loïc Dachary over 9 years ago

  • Description updated (diff)
Actions #2

Updated by Loïc Dachary over 9 years ago

  • Status changed from New to Won't Fix

Apparently it is by design. Lookup will look for the key in weak_refs and will assume that if it finds it there, it is the same as finding it in the lru cache.

Actions

Also available in: Atom PDF