Repository navigation
osd: Allow repair of an object with a bad data_digest in object_info on all replicas - #23217
Conversation
There was a problem hiding this comment.
fwiw i think the error return is still nicer for the caller. otherwise they have to call ss.str() with constructs a std::string and test it for empty.
There was a problem hiding this comment.
I think the clenaup i'd make is to make the 'error' enum a bool (error = true, error = false), and/or maybe rename 'found_error'.
There was a problem hiding this comment.
You are right I could use the value only to replace the ss.empty() check. This does make me realize that when osd_distrust_data_digest is set and we clear the error the console log will still output the mismatch message that came from be_compare_scrub_objects().
There was a problem hiding this comment.
It probably still makes sense to log a message that the repair happened. Maybe that just means there will be 2 messages, one mismatch, and then another repair message, in the console log?
There was a problem hiding this comment.
shoudn't this corrupt the data_digest instead?
There was a problem hiding this comment.
The purpose of his change is to have 2 errors, object_info_inconsistency AND data_digest_mismatch_info. That way we see that both kinds of repairs happen during a repair. One uses recovery to fix and the other missing_digest mechanism.
There was a problem hiding this comment.
oh i see, and the test is updating the bytes separately via a different cot call. great!
Signed-off-by: David Zafman <[email protected]>
Signed-off-by: David Zafman <[email protected]>
…replicas match each other. Fixes: https://tracker.ceph.com/issues/25085 Signed-off-by: David Zafman <[email protected]>
Signed-off-by: David Zafman <[email protected]>
| errorstream << pgid << " shard " << j->first << ": soid " << *k | ||
| << " " << ss.str() << "\n"; | ||
| } else if (found) { | ||
| } else if (object_error.errors != 0) { |
There was a problem hiding this comment.
my concern is that, we don't reset object_error before moving to another ScrubMap. so once we identify an error in a certain shard of current object, we will always go to this branch if there is no shard error in succeeding shards. but the reason we go to this branch is not necessary that the object_error.errors is contributed by current shard.
There was a problem hiding this comment.
@tchaikov Good catch, but will require a follow-on fix. I now realize that we had a bug when I introduced some inconsistency checking in be_select_auth_object(). This change actually improves repair of those inconsistencies at the expense of repairing all shards instead of just the ones that don't match the authoritative shard. This is a result of not resetting object_error.errors.
I had already filed a tracker http://tracker.ceph.com/issues/25108 to cover a logging issue with errors found in be_select_auth_object(). But really I need to move all error checking out of be_select_auth_object() and into be_compare_scrub_objects(). This will fix the logging issue. Then we can return to } else if (found) { which is only needed for logging. At that point the set<pg_shard_t> object_errors can go away if auth_list can't be empty. I'm not totally sure about that yet.
There was a problem hiding this comment.
@tchaikov I've got a first cut at restructuring of this code to address your concern and tracker 25108. It'll be in a new pull request.
|
Test failures appear unrelated |
|
2839428 deep-scrub stat mismatch, got 0/-1 objects, 0/0 clones, 0/-1 dirty, 0/0 omap, 0/0 pinned, 0/0 hit_set_archive, 0/0 whiteouts 0/-4096 bytes, 0/0 manifest objects, 0/0 hit_set_archive bytes
Let's open a ticket for this one? I haven't seen it before but i'm guessing/hoping it's related to the mark-lost-unfound code
|
|
@dzafman sure, i will re-review it early tomorrow. |
Fixes: https://tracker.ceph.com/issues/25085