Aside from expose an ECBackend internal detail, it causes ReplicatedPG
to cache the value causing trouble with WRITEFULL.
Partially fixes: #12983
Signed-off-by: Samuel Just <sjust@redhat.com>
++it) {
it->second.rebuild();
}
- op.obc = get_parent()->get_obc(hoid, op.xattrs);
+ // Need to remove ECUtil::get_hinfo_key() since it should not leak out
+ // of the backend (see bug #12983)
+ map<string, bufferlist> sanitized_attrs(op.xattrs);
+ sanitized_attrs.erase(ECUtil::get_hinfo_key());
+ op.obc = get_parent()->get_obc(hoid, sanitized_attrs);
+ assert(op.obc);
op.recovery_info.size = op.obc->obs.oi.size;
op.recovery_info.oi = op.obc->obs.oi;
}