Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: core: ENOENT in collection_move_rename on EC backfill target #27943

Merged
merged 3 commits into from May 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 13 additions & 8 deletions src/osd/PG.cc
Expand Up @@ -3625,11 +3625,16 @@ void PG::append_log(

PGLogEntryHandler handler{this, &t};
if (!transaction_applied) {
/* We must be a backfill peer, so it's ok if we apply
/* We must be a backfill or async recovery peer, so it's ok if we apply
* out-of-turn since we won't be considered when
* determining a min possible last_update.
*
* We skip_rollforward() here, which advances the crt, without
* doing an actual rollforward. This avoids cleaning up entries
* from the backend and we do not end up in a situation, where the
* object is deleted before we can _merge_object_divergent_entries().
*/
pg_log.roll_forward(&handler);
pg_log.skip_rollforward();
}

for (vector<pg_log_entry_t>::const_iterator p = logv.begin();
Expand Down Expand Up @@ -4363,12 +4368,12 @@ void PG::_scan_rollback_obs(const vector<ghobject_t> &rollback_obs)
i != rollback_obs.end();
++i) {
if (i->generation < trimmed_to.version) {
osd->clog->error() << "osd." << osd->whoami
<< " pg " << info.pgid
<< " found obsolete rollback obj "
<< *i << " generation < trimmed_to "
<< trimmed_to
<< "...repaired";
dout(10) << __func__ << "osd." << osd->whoami
<< " pg " << info.pgid
<< " found obsolete rollback obj "
<< *i << " generation < trimmed_to "
<< trimmed_to
<< "...repaired" << dendl;
t.remove(coll, *i);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/osd/PGLog.h
Expand Up @@ -726,6 +726,10 @@ struct PGLog : DoutPrefixProvider {
h);
}

void skip_rollforward() {
log.skip_can_rollback_to_to_head();
}

//////////////////// get or set log & missing ////////////////////

void reset_backfill_claim_log(const pg_log_t &o, LogEntryHandler *h) {
Expand Down