In choose_leaf mode we normally should have a stack of 2 and
hence below here we still need to re-check the iterator against
the stack loop.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit
4ec24128fddd84f529348e460e45606eff42fc03)
<< " w " << w << dendl;
vector<int> o;
auto tmpi = i;
+ if (i == orig.end()) {
+ ldout(cct, 10) << __func__ << " end of orig, break 0" << dendl;
+ break;
+ }
for (auto from : w) {
ldout(cct, 10) << " from " << from << dendl;
// identify leaves under each choice. we use this to check whether any of these
ldout(cct, 10) << __func__ << " pos " << pos << " replace "
<< *i << " -> " << item << dendl;
replaced = true;
+ assert(i != orig.end());
++i;
break;
}
if (!replaced) {
ldout(cct, 10) << __func__ << " pos " << pos << " keep " << *i
<< dendl;
+ assert(i != orig.end());
o.push_back(*i);
++i;
}