Project

General

Profile

Actions

Bug #11034

closed

GenericObjectMap::clear_header misuses KeyValueDB::rmkeys_by_prefix

Added by Chris Pacejo about 9 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The KeyValueDB interface seems to treat prefixes as true namespaces, and not simply prefixes prepended to the key. That is, the prefix-key pair "FooBar" - "Baz" is distinct from "Foo" - "BarBaz". (It's not 100% clear as the KeyValueDB interface is not documented yet to my knowledge.)

Likewise, the KeyValueDB::rmkeys_by_prefix function seems to be implemented as deleting only keys whose prefix is exactly equal to the given prefix. (At least, this is how the LevelDB backend seems to implement it.)

However, the GenericObjectMap::clear_header function invokes rmkeys_by_prefix on the non-existent prefix SEQ_xxxx, where xxxx is a sequence of digits. This appears to be an attempt to delete keys with all prefixes which start with _SEQ_xxxx: e.g., _SEQ_xxxx_STRIP, SEQ_xxxx_OBJATTR__.

This seems to affect at least v0.91 and later.

Attached is a patch which seems to fix this issue.


Files

ceph-gom-prefix.patch (1003 Bytes) ceph-gom-prefix.patch Chris Pacejo, 03/05/2015 04:13 PM
Actions #1

Updated by Greg Farnum almost 7 years ago

  • Status changed from New to Closed

This was part of KeyValueStore, which is dead.

Actions

Also available in: Atom PDF