This can not happen at the primary because scrub_compare_maps() is only
called once per chunk start.
Preemption causes a smaller chunk from start to be processed again at
replicas. We clear any of the previous chunk's information.
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit
9e0ac797c602a088447679b04e14ec0cfaf9dd7b)
_repair_oinfo_oid(map);
if (!is_primary()) {
ScrubMap for_meta_scrub;
+ // In case we restarted smaller chunk, clear old data
+ scrubber.cleaned_meta_map.clear_from(scrubber.start);
scrubber.cleaned_meta_map.insert(map);
scrubber.clean_meta_map(for_meta_scrub);
_scan_snaps(for_meta_scrub);
bool has_large_omap_object_errors:1;
void merge_incr(const ScrubMap &l);
+ void clear_from(const hobject_t& start) {
+ objects.erase(objects.lower_bound(start), objects.end());
+ }
void insert(const ScrubMap &r) {
objects.insert(r.objects.begin(), r.objects.end());
}