};
public:
+ string access_lock_name;
RWLock access_lock;
/// Type of returned paths
typedef ceph::shared_ptr<Path> IndexedPath;
/// Call prior to removing directory
virtual int prep_delete() { return 0; }
- CollectionIndex():access_lock("CollectionIndex::access_lock"){}
+ CollectionIndex(coll_t collection):
+ access_lock_name ("CollectionIndex::access_lock::" + collection.to_str()),
+ access_lock(access_lock_name.c_str()) {}
/// Virtual destructor
virtual ~CollectionIndex() {}
string base_path;
coll_t collection;
public:
- FlatIndex(coll_t collection, string base_path) : base_path(base_path),
- collection(collection) {}
+ FlatIndex(coll_t collection, string base_path) :
+ CollectionIndex(collection),
+ base_path(base_path),
+ collection(collection) {}
/// @see CollectionIndex
uint32_t collection_version() { return FLAT_INDEX_TAG; }
const char *base_path, ///< [in] path to Index root
uint32_t index_version,
double _error_injection_probability=0)
- : base_path(base_path),
+ : CollectionIndex(collection),
+ base_path(base_path),
index_version(index_version),
error_injection_enabled(false),
error_injection_on(_error_injection_probability != 0),