7 #include "common/config.h"
8 #include "common/Formatter.h"
9 #include "common/errno.h"
11 #include "rgw_rados.h"
12 #include "rgw_orphan.h"
14 #define dout_subsys ceph_subsys_rgw
16 #define DEFAULT_NUM_SHARDS 64
18 static string
obj_fingerprint(const string
& oid
, const char *force_ns
= NULL
)
20 ssize_t pos
= oid
.find('_');
22 cerr
<< "ERROR: object does not have a bucket marker: " << oid
<< std::endl
;
25 string obj_marker
= oid
.substr(0, pos
);
29 rgw_obj_key::parse_raw_oid(oid
.substr(pos
+ 1), &key
);
39 rgw_obj
new_obj(b
, key
);
40 s
= obj_marker
+ "_" + new_obj
.get_oid();
44 size_t i
= s
.size() - 1;
45 for (; i
>= s
.size() - 10; --i
) {
47 if (!isdigit(c
) && c
!= '.' && c
!= '_') {
52 return s
.substr(0, i
+ 1);
55 int RGWOrphanStore::read_job(const string
& job_name
, RGWOrphanSearchState
& state
)
58 map
<string
, bufferlist
> vals
;
59 keys
.insert(job_name
);
60 int r
= ioctx
.omap_get_vals_by_keys(oid
, keys
, &vals
);
65 map
<string
, bufferlist
>::iterator iter
= vals
.find(job_name
);
66 if (iter
== vals
.end()) {
71 bufferlist
& bl
= iter
->second
;
73 } catch (buffer::error
& err
) {
74 lderr(store
->ctx()) << "ERROR: could not decode buffer" << dendl
;
81 int RGWOrphanStore::write_job(const string
& job_name
, const RGWOrphanSearchState
& state
)
83 map
<string
, bufferlist
> vals
;
87 int r
= ioctx
.omap_set(oid
, vals
);
95 int RGWOrphanStore::remove_job(const string
& job_name
)
98 keys
.insert(job_name
);
100 int r
= ioctx
.omap_rm_keys(oid
, keys
);
108 int RGWOrphanStore::list_jobs(map
<string
,RGWOrphanSearchState
>& job_list
)
110 map
<string
,bufferlist
> vals
;
115 // loop through all the omap vals from index object, storing them to job_list,
116 // read in batches of 1024, we update the marker every iteration and exit the
117 // loop when we find that total size read out is less than batch size
119 r
= ioctx
.omap_get_vals(oid
, marker
, MAX_READ
, &vals
);
125 for (const auto &it
: vals
) {
127 RGWOrphanSearchState state
;
129 bufferlist bl
= it
.second
;
131 } catch (buffer::error
& err
) {
132 lderr(store
->ctx()) << "ERROR: could not decode buffer" << dendl
;
135 job_list
[it
.first
] = state
;
137 } while (r
== MAX_READ
);
142 int RGWOrphanStore::init()
144 rgw_pool
& log_pool
= store
->get_zone_params().log_pool
;
145 int r
= rgw_init_ioctx(store
->get_rados_handle(), log_pool
, ioctx
);
147 cerr
<< "ERROR: failed to open log pool (" << log_pool
<< " ret=" << r
<< std::endl
;
154 int RGWOrphanStore::store_entries(const string
& oid
, const map
<string
, bufferlist
>& entries
)
156 librados::ObjectWriteOperation op
;
157 op
.omap_set(entries
);
158 cout
<< "storing " << entries
.size() << " entries at " << oid
<< std::endl
;
159 ldout(store
->ctx(), 20) << "storing " << entries
.size() << " entries at " << oid
<< ": " << dendl
;
160 for (map
<string
, bufferlist
>::const_iterator iter
= entries
.begin(); iter
!= entries
.end(); ++iter
) {
161 ldout(store
->ctx(), 20) << " > " << iter
->first
<< dendl
;
163 int ret
= ioctx
.operate(oid
, &op
);
165 lderr(store
->ctx()) << "ERROR: " << __func__
<< "(" << oid
<< ") returned ret=" << ret
<< dendl
;
171 int RGWOrphanStore::read_entries(const string
& oid
, const string
& marker
, map
<string
, bufferlist
> *entries
, bool *truncated
)
173 #define MAX_OMAP_GET 100
174 int ret
= ioctx
.omap_get_vals(oid
, marker
, MAX_OMAP_GET
, entries
);
175 if (ret
< 0 && ret
!= -ENOENT
) {
176 cerr
<< "ERROR: " << __func__
<< "(" << oid
<< ") returned ret=" << cpp_strerror(-ret
) << std::endl
;
179 *truncated
= (entries
->size() == MAX_OMAP_GET
);
184 int RGWOrphanSearch::init(const string
& job_name
, RGWOrphanSearchInfo
*info
) {
185 int r
= orphan_store
.init();
190 RGWOrphanSearchState state
;
191 r
= orphan_store
.read_job(job_name
, state
);
192 if (r
< 0 && r
!= -ENOENT
) {
193 lderr(store
->ctx()) << "ERROR: failed to read state ret=" << r
<< dendl
;
198 search_info
= state
.info
;
199 search_stage
= state
.stage
;
200 } else if (info
) { /* r == -ENOENT, initiate a new job if info was provided */
202 search_info
.job_name
= job_name
;
203 search_info
.num_shards
= (info
->num_shards
? info
->num_shards
: DEFAULT_NUM_SHARDS
);
204 search_info
.start_time
= ceph_clock_now();
205 search_stage
= RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_INIT
);
209 lderr(store
->ctx()) << "ERROR: failed to write state ret=" << r
<< dendl
;
213 lderr(store
->ctx()) << "ERROR: job not found" << dendl
;
217 index_objs_prefix
= RGW_ORPHAN_INDEX_PREFIX
+ string(".");
218 index_objs_prefix
+= job_name
;
220 for (int i
= 0; i
< search_info
.num_shards
; i
++) {
223 snprintf(buf
, sizeof(buf
), "%s.rados.%d", index_objs_prefix
.c_str(), i
);
224 all_objs_index
[i
] = buf
;
226 snprintf(buf
, sizeof(buf
), "%s.buckets.%d", index_objs_prefix
.c_str(), i
);
227 buckets_instance_index
[i
] = buf
;
229 snprintf(buf
, sizeof(buf
), "%s.linked.%d", index_objs_prefix
.c_str(), i
);
230 linked_objs_index
[i
] = buf
;
235 int RGWOrphanSearch::log_oids(map
<int, string
>& log_shards
, map
<int, list
<string
> >& oids
)
237 map
<int, list
<string
> >::iterator miter
= oids
.begin();
239 list
<log_iter_info
> liters
; /* a list of iterator pairs for begin and end */
241 for (; miter
!= oids
.end(); ++miter
) {
243 info
.oid
= log_shards
[miter
->first
];
244 info
.cur
= miter
->second
.begin();
245 info
.end
= miter
->second
.end();
246 liters
.push_back(info
);
249 list
<log_iter_info
>::iterator list_iter
;
250 while (!liters
.empty()) {
251 list_iter
= liters
.begin();
253 while (list_iter
!= liters
.end()) {
254 log_iter_info
& cur_info
= *list_iter
;
256 list
<string
>::iterator
& cur
= cur_info
.cur
;
257 list
<string
>::iterator
& end
= cur_info
.end
;
259 map
<string
, bufferlist
> entries
;
260 #define MAX_OMAP_SET_ENTRIES 100
261 for (int j
= 0; cur
!= end
&& j
!= MAX_OMAP_SET_ENTRIES
; ++cur
, ++j
) {
262 ldout(store
->ctx(), 20) << "adding obj: " << *cur
<< dendl
;
263 entries
[*cur
] = bufferlist();
266 int ret
= orphan_store
.store_entries(cur_info
.oid
, entries
);
270 list
<log_iter_info
>::iterator tmp
= list_iter
;
280 int RGWOrphanSearch::build_all_oids_index()
282 librados::IoCtx ioctx
;
284 int ret
= rgw_init_ioctx(store
->get_rados_handle(), search_info
.pool
, ioctx
);
286 lderr(store
->ctx()) << __func__
<< ": rgw_init_ioctx() returned ret=" << ret
<< dendl
;
290 ioctx
.set_namespace(librados::all_nspaces
);
291 librados::NObjectIterator i
= ioctx
.nobjects_begin();
292 librados::NObjectIterator i_end
= ioctx
.nobjects_end();
294 map
<int, list
<string
> > oids
;
299 cout
<< "logging all objects in the pool" << std::endl
;
301 for (; i
!= i_end
; ++i
) {
302 string nspace
= i
->get_nspace();
303 string oid
= i
->get_oid();
304 string locator
= i
->get_locator();
306 ssize_t pos
= oid
.find('_');
308 cout
<< "unidentified oid: " << oid
<< ", skipping" << std::endl
;
309 /* what is this object, oids should be in the format of <bucket marker>_<obj>,
314 string stripped_oid
= oid
.substr(pos
+ 1);
316 if (!rgw_obj_key::parse_raw_oid(stripped_oid
, &key
)) {
317 cout
<< "cannot parse oid: " << oid
<< ", skipping" << std::endl
;
321 if (key
.ns
.empty()) {
322 /* skipping head objects, we don't want to remove these as they are mutable and
323 * cleaning them up is racy (can race with object removal and a later recreation)
325 cout
<< "skipping head object: oid=" << oid
<< std::endl
;
329 string oid_fp
= obj_fingerprint(oid
);
331 ldout(store
->ctx(), 20) << "oid_fp=" << oid_fp
<< dendl
;
333 int shard
= orphan_shard(oid_fp
);
334 oids
[shard
].push_back(oid
);
336 #define COUNT_BEFORE_FLUSH 1000
338 if (++count
>= COUNT_BEFORE_FLUSH
) {
339 ldout(store
->ctx(), 1) << "iterated through " << total
<< " objects" << dendl
;
340 ret
= log_oids(all_objs_index
, oids
);
342 cerr
<< __func__
<< ": ERROR: log_oids() returned ret=" << ret
<< std::endl
;
349 ret
= log_oids(all_objs_index
, oids
);
351 cerr
<< __func__
<< ": ERROR: log_oids() returned ret=" << ret
<< std::endl
;
358 int RGWOrphanSearch::build_buckets_instance_index()
362 string section
= "bucket.instance";
363 int ret
= store
->meta_mgr
->list_keys_init(section
, &handle
);
365 lderr(store
->ctx()) << "ERROR: can't get key: " << cpp_strerror(-ret
) << dendl
;
369 map
<int, list
<string
> > instances
;
373 RGWObjectCtx
obj_ctx(store
);
380 ret
= store
->meta_mgr
->list_keys_next(handle
, max
, keys
, &truncated
);
382 lderr(store
->ctx()) << "ERROR: lists_keys_next(): " << cpp_strerror(-ret
) << dendl
;
386 for (list
<string
>::iterator iter
= keys
.begin(); iter
!= keys
.end(); ++iter
) {
388 ldout(store
->ctx(), 10) << "bucket_instance=" << *iter
<< " total=" << total
<< dendl
;
389 int shard
= orphan_shard(*iter
);
390 instances
[shard
].push_back(*iter
);
392 if (++count
>= COUNT_BEFORE_FLUSH
) {
393 ret
= log_oids(buckets_instance_index
, instances
);
395 lderr(store
->ctx()) << __func__
<< ": ERROR: log_oids() returned ret=" << ret
<< dendl
;
405 ret
= log_oids(buckets_instance_index
, instances
);
407 lderr(store
->ctx()) << __func__
<< ": ERROR: log_oids() returned ret=" << ret
<< dendl
;
410 store
->meta_mgr
->list_keys_complete(handle
);
415 int RGWOrphanSearch::handle_stat_result(map
<int, list
<string
> >& oids
, RGWRados::Object::Stat::Result
& result
)
417 set
<string
> obj_oids
;
418 rgw_bucket
& bucket
= result
.obj
.bucket
;
419 if (!result
.has_manifest
) { /* a very very old object, or part of a multipart upload during upload */
420 const string loc
= bucket
.bucket_id
+ "_" + result
.obj
.get_oid();
421 obj_oids
.insert(obj_fingerprint(loc
));
424 * multipart parts don't have manifest on them, it's in the meta object. Instead of reading the
425 * meta object, just add a "shadow" object to the mix
427 obj_oids
.insert(obj_fingerprint(loc
, "shadow"));
429 RGWObjManifest
& manifest
= result
.manifest
;
431 RGWObjManifest::obj_iterator miter
;
432 for (miter
= manifest
.obj_begin(); miter
!= manifest
.obj_end(); ++miter
) {
433 const rgw_raw_obj
& loc
= miter
.get_location().get_raw_obj(store
);
435 obj_oids
.insert(obj_fingerprint(s
));
439 for (set
<string
>::iterator iter
= obj_oids
.begin(); iter
!= obj_oids
.end(); ++iter
) {
440 ldout(store
->ctx(), 20) << __func__
<< ": oid for obj=" << result
.obj
<< ": " << *iter
<< dendl
;
442 int shard
= orphan_shard(*iter
);
443 oids
[shard
].push_back(*iter
);
449 int RGWOrphanSearch::pop_and_handle_stat_op(map
<int, list
<string
> >& oids
, std::deque
<RGWRados::Object::Stat
>& ops
)
451 RGWRados::Object::Stat
& front_op
= ops
.front();
453 int ret
= front_op
.wait();
455 if (ret
!= -ENOENT
) {
456 lderr(store
->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret
) << dendl
;
460 ret
= handle_stat_result(oids
, front_op
.result
);
462 lderr(store
->ctx()) << "ERROR: handle_stat_response() returned error: " << cpp_strerror(-ret
) << dendl
;
469 int RGWOrphanSearch::build_linked_oids_for_bucket(const string
& bucket_instance_id
, map
<int, list
<string
> >& oids
)
471 ldout(store
->ctx(), 10) << "building linked oids for bucket instance: " << bucket_instance_id
<< dendl
;
472 RGWBucketInfo bucket_info
;
473 RGWObjectCtx
obj_ctx(store
);
474 int ret
= store
->get_bucket_instance_info(obj_ctx
, bucket_instance_id
, bucket_info
, NULL
, NULL
);
476 if (ret
== -ENOENT
) {
477 /* probably raced with bucket removal */
480 lderr(store
->ctx()) << __func__
<< ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret
<< dendl
;
484 RGWRados::Bucket
target(store
, bucket_info
);
485 RGWRados::Bucket::List
list_op(&target
);
488 list_op
.params
.marker
= rgw_obj_key(marker
);
489 list_op
.params
.list_versions
= true;
490 list_op
.params
.enforce_ns
= false;
494 deque
<RGWRados::Object::Stat
> stat_ops
;
499 vector
<rgw_bucket_dir_entry
> result
;
501 #define MAX_LIST_OBJS_ENTRIES 100
502 ret
= list_op
.list_objects(MAX_LIST_OBJS_ENTRIES
, &result
, NULL
, &truncated
);
504 cerr
<< "ERROR: store->list_objects(): " << cpp_strerror(-ret
) << std::endl
;
508 for (vector
<rgw_bucket_dir_entry
>::iterator iter
= result
.begin(); iter
!= result
.end(); ++iter
) {
509 rgw_bucket_dir_entry
& entry
= *iter
;
510 if (entry
.key
.instance
.empty()) {
511 ldout(store
->ctx(), 20) << "obj entry: " << entry
.key
.name
<< dendl
;
513 ldout(store
->ctx(), 20) << "obj entry: " << entry
.key
.name
<< " [" << entry
.key
.instance
<< "]" << dendl
;
516 ldout(store
->ctx(), 20) << __func__
<< ": entry.key.name=" << entry
.key
.name
<< " entry.key.instance=" << entry
.key
.instance
<< dendl
;
517 rgw_obj
obj(bucket_info
.bucket
, entry
.key
);
519 RGWRados::Object
op_target(store
, bucket_info
, obj_ctx
, obj
);
521 stat_ops
.push_back(RGWRados::Object::Stat(&op_target
));
522 RGWRados::Object::Stat
& op
= stat_ops
.back();
525 ret
= op
.stat_async();
527 lderr(store
->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret
) << dendl
;
530 if (stat_ops
.size() >= max_concurrent_ios
) {
531 ret
= pop_and_handle_stat_op(oids
, stat_ops
);
533 if (ret
!= -ENOENT
) {
534 lderr(store
->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret
) << dendl
;
538 if (++count
>= COUNT_BEFORE_FLUSH
) {
539 ret
= log_oids(linked_objs_index
, oids
);
541 cerr
<< __func__
<< ": ERROR: log_oids() returned ret=" << ret
<< std::endl
;
550 while (!stat_ops
.empty()) {
551 ret
= pop_and_handle_stat_op(oids
, stat_ops
);
553 if (ret
!= -ENOENT
) {
554 lderr(store
->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret
) << dendl
;
562 int RGWOrphanSearch::build_linked_oids_index()
564 map
<int, list
<string
> > oids
;
565 map
<int, string
>::iterator iter
= buckets_instance_index
.find(search_stage
.shard
);
566 for (; iter
!= buckets_instance_index
.end(); ++iter
) {
567 ldout(store
->ctx(), 0) << "building linked oids index: " << iter
->first
<< "/" << buckets_instance_index
.size() << dendl
;
570 string oid
= iter
->second
;
573 map
<string
, bufferlist
> entries
;
574 int ret
= orphan_store
.read_entries(oid
, search_stage
.marker
, &entries
, &truncated
);
575 if (ret
== -ENOENT
) {
581 lderr(store
->ctx()) << __func__
<< ": ERROR: read_entries() oid=" << oid
<< " returned ret=" << ret
<< dendl
;
585 if (entries
.empty()) {
589 for (map
<string
, bufferlist
>::iterator eiter
= entries
.begin(); eiter
!= entries
.end(); ++eiter
) {
590 ldout(store
->ctx(), 20) << " indexed entry: " << eiter
->first
<< dendl
;
591 ret
= build_linked_oids_for_bucket(eiter
->first
, oids
);
593 lderr(store
->ctx()) << __func__
<< ": ERROR: build_linked_oids_for_bucket() indexed entry=" << eiter
->first
594 << " returned ret=" << ret
<< dendl
;
599 search_stage
.shard
= iter
->first
;
600 search_stage
.marker
= entries
.rbegin()->first
; /* last entry */
603 search_stage
.marker
.clear();
606 int ret
= log_oids(linked_objs_index
, oids
);
608 cerr
<< __func__
<< ": ERROR: log_oids() returned ret=" << ret
<< std::endl
;
614 cerr
<< __func__
<< ": ERROR: failed to write state ret=" << ret
<< std::endl
;
622 librados::IoCtx ioctx
;
625 map
<string
, bufferlist
> entries
;
626 map
<string
, bufferlist
>::iterator iter
;
631 OMAPReader(librados::IoCtx
& _ioctx
, const string
& _oid
) : ioctx(_ioctx
), oid(_oid
), truncated(true) {
632 iter
= entries
.end();
635 int get_next(string
*key
, bufferlist
*pbl
, bool *done
);
638 int OMAPReader::get_next(string
*key
, bufferlist
*pbl
, bool *done
)
640 if (iter
!= entries
.end()) {
656 #define MAX_OMAP_GET_ENTRIES 100
657 int ret
= ioctx
.omap_get_vals(oid
, marker
, MAX_OMAP_GET_ENTRIES
, &entries
);
659 if (ret
== -ENOENT
) {
666 truncated
= (entries
.size() == MAX_OMAP_GET_ENTRIES
);
667 iter
= entries
.begin();
668 return get_next(key
, pbl
, done
);
671 int RGWOrphanSearch::compare_oid_indexes()
673 assert(linked_objs_index
.size() == all_objs_index
.size());
675 librados::IoCtx
& ioctx
= orphan_store
.get_ioctx();
677 librados::IoCtx data_ioctx
;
679 int ret
= rgw_init_ioctx(store
->get_rados_handle(), search_info
.pool
, data_ioctx
);
681 lderr(store
->ctx()) << __func__
<< ": rgw_init_ioctx() returned ret=" << ret
<< dendl
;
685 uint64_t time_threshold
= search_info
.start_time
.sec() - stale_secs
;
687 map
<int, string
>::iterator liter
= linked_objs_index
.begin();
688 map
<int, string
>::iterator aiter
= all_objs_index
.begin();
690 for (; liter
!= linked_objs_index
.end(); ++liter
, ++aiter
) {
691 OMAPReader
linked_entries(ioctx
, liter
->second
);
692 OMAPReader
all_entries(ioctx
, aiter
->second
);
697 bool linked_done
= false;
702 int r
= all_entries
.get_next(&key
, NULL
, &done
);
710 string key_fp
= obj_fingerprint(key
);
712 while (cur_linked
< key_fp
&& !linked_done
) {
713 r
= linked_entries
.get_next(&cur_linked
, NULL
, &linked_done
);
719 if (cur_linked
== key_fp
) {
720 ldout(store
->ctx(), 20) << "linked: " << key
<< dendl
;
725 r
= data_ioctx
.stat(key
, NULL
, &mtime
);
728 lderr(store
->ctx()) << "ERROR: ioctx.stat(" << key
<< ") returned ret=" << r
<< dendl
;
732 if (stale_secs
&& (uint64_t)mtime
>= time_threshold
) {
733 ldout(store
->ctx(), 20) << "skipping: " << key
<< " (mtime=" << mtime
<< " threshold=" << time_threshold
<< ")" << dendl
;
736 ldout(store
->ctx(), 20) << "leaked: " << key
<< dendl
;
737 cout
<< "leaked: " << key
<< std::endl
;
744 int RGWOrphanSearch::run()
748 switch (search_stage
.stage
) {
750 case ORPHAN_SEARCH_STAGE_INIT
:
751 ldout(store
->ctx(), 0) << __func__
<< "(): initializing state" << dendl
;
752 search_stage
= RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_LSPOOL
);
755 lderr(store
->ctx()) << __func__
<< ": ERROR: failed to save state, ret=" << r
<< dendl
;
759 case ORPHAN_SEARCH_STAGE_LSPOOL
:
760 ldout(store
->ctx(), 0) << __func__
<< "(): building index of all objects in pool" << dendl
;
761 r
= build_all_oids_index();
763 lderr(store
->ctx()) << __func__
<< ": ERROR: build_all_objs_index returned ret=" << r
<< dendl
;
767 search_stage
= RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_LSBUCKETS
);
770 lderr(store
->ctx()) << __func__
<< ": ERROR: failed to save state, ret=" << r
<< dendl
;
775 case ORPHAN_SEARCH_STAGE_LSBUCKETS
:
776 ldout(store
->ctx(), 0) << __func__
<< "(): building index of all bucket indexes" << dendl
;
777 r
= build_buckets_instance_index();
779 lderr(store
->ctx()) << __func__
<< ": ERROR: build_all_objs_index returned ret=" << r
<< dendl
;
783 search_stage
= RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_ITERATE_BI
);
786 lderr(store
->ctx()) << __func__
<< ": ERROR: failed to save state, ret=" << r
<< dendl
;
792 case ORPHAN_SEARCH_STAGE_ITERATE_BI
:
793 ldout(store
->ctx(), 0) << __func__
<< "(): building index of all linked objects" << dendl
;
794 r
= build_linked_oids_index();
796 lderr(store
->ctx()) << __func__
<< ": ERROR: build_all_objs_index returned ret=" << r
<< dendl
;
800 search_stage
= RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_COMPARE
);
803 lderr(store
->ctx()) << __func__
<< ": ERROR: failed to save state, ret=" << r
<< dendl
;
808 case ORPHAN_SEARCH_STAGE_COMPARE
:
809 r
= compare_oid_indexes();
811 lderr(store
->ctx()) << __func__
<< ": ERROR: build_all_objs_index returned ret=" << r
<< dendl
;
825 int RGWOrphanSearch::remove_index(map
<int, string
>& index
)
827 librados::IoCtx
& ioctx
= orphan_store
.get_ioctx();
829 for (map
<int, string
>::iterator iter
= index
.begin(); iter
!= index
.end(); ++iter
) {
830 int r
= ioctx
.remove(iter
->second
);
833 ldout(store
->ctx(), 0) << "ERROR: couldn't remove " << iter
->second
<< ": ret=" << r
<< dendl
;
840 int RGWOrphanSearch::finish()
842 int r
= remove_index(all_objs_index
);
844 ldout(store
->ctx(), 0) << "ERROR: remove_index(" << all_objs_index
<< ") returned ret=" << r
<< dendl
;
846 r
= remove_index(buckets_instance_index
);
848 ldout(store
->ctx(), 0) << "ERROR: remove_index(" << buckets_instance_index
<< ") returned ret=" << r
<< dendl
;
850 r
= remove_index(linked_objs_index
);
852 ldout(store
->ctx(), 0) << "ERROR: remove_index(" << linked_objs_index
<< ") returned ret=" << r
<< dendl
;
855 r
= orphan_store
.remove_job(search_info
.job_name
);
857 ldout(store
->ctx(), 0) << "ERROR: could not remove job name (" << search_info
.job_name
<< ") ret=" << r
<< dendl
;