Otherwise, when we eventually remove the temp collection, there might be
objects in the temp collection which were independently pulled into the child
pg collection. Thus, removing the old stale parent link from its temp
collection also blasts the omap entries and snap mappings for the real child
object.
Backport: bobtail
Fixes: #4452
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
split_bits,
i->m_seed,
coll_t(*i));
+ if (parent->have_temp_coll()) {
+ rctx->transaction->create_collection(
+ coll_t::make_temp_coll(*i));
+ rctx->transaction->split_collection(
+ coll_t::make_temp_coll(parent->info.pgid),
+ split_bits,
+ i->m_seed,
+ coll_t::make_temp_coll(*i));
+ }
for (interval_set<snapid_t>::iterator k = parent->snap_collections.begin();
k != parent->snap_collections.end();
++k) {