We may not have "created" the temp collection since OSD restart
before removing the PG. have_temp_coll must also look at the
OSD store. Currently, the only user is pg removal, so the
extra work is acceptable.
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
}
}
+bool ReplicatedPG::have_temp_coll()
+{
+ return temp_created || osd->store->collection_exists(temp_coll);
+}
+
coll_t ReplicatedPG::get_temp_coll(ObjectStore::Transaction *t)
{
if (temp_created)
coll_t temp_coll;
coll_t get_temp_coll(ObjectStore::Transaction *t);
public:
- bool have_temp_coll() {
- return temp_created;
- }
+ bool have_temp_coll();
coll_t get_temp_coll() {
return temp_coll;
}