r = _create_collection(cid, op->split_bits);
}
break;
+ case Transaction::OP_RMCOLL:
+ {
+ coll_t cid = i.get_cid(op->cid);
+ r = _remove_collection(cid);
+ }
+ break;
case Transaction::OP_SETALLOCHINT:
{
r = 0;
return 0;
}
+int CyanStore::Shard::_remove_collection(const coll_t& cid)
+{
+ logger().debug("{} cid={}", __func__, cid);
+ auto c = _get_collection(cid);
+ if (!c) {
+ return -ENOENT;
+ }
+ coll_map.erase(cid);
+ return 0;
+}
+
boost::intrusive_ptr<Collection>
CyanStore::Shard::_get_collection(const coll_t& cid)
{
std::string_view name);
int _rm_attrs(const coll_t& cid, const ghobject_t& oid);
int _create_collection(const coll_t& cid, int bits);
+ int _remove_collection(const coll_t& cid);
boost::intrusive_ptr<Collection> _get_collection(const coll_t& cid);
private: