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

src/osd/PG.cc: remove redundant call to trim_log() #23354

Merged
merged 1 commit into from Jul 31, 2018
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
30 changes: 0 additions & 30 deletions src/osd/PG.cc
Expand Up @@ -3573,33 +3573,6 @@ void PG::write_if_dirty(ObjectStore::Transaction& t)
t.omap_setkeys(coll, pgmeta_oid, km);
}

void PG::trim_log()
{
assert(is_primary());
calc_trim_to();
dout(10) << __func__ << " to " << pg_trim_to << dendl;
if (pg_trim_to != eversion_t()) {
// inform peers to trim log
assert(!acting_recovery_backfill.empty());
for (set<pg_shard_t>::iterator i = acting_recovery_backfill.begin();
i != acting_recovery_backfill.end();
++i) {
if (*i == pg_whoami) continue;
osd->send_message_osd_cluster(
i->osd,
new MOSDPGTrim(
get_osdmap()->get_epoch(),
spg_t(info.pgid.pgid, i->shard),
pg_trim_to),
get_osdmap()->get_epoch());
}

// trim primary as well
pg_log.trim(pg_trim_to, info);
dirty_info = true;
}
}

void PG::add_log_entry(const pg_log_entry_t& e, bool applied)
{
// raise last_complete only if we were previously up to date
Expand Down Expand Up @@ -7812,9 +7785,6 @@ PG::RecoveryState::Recovered::Recovered(my_context ctx)
pg->publish_stats_to_osd();
}

// trim pglog on recovered
pg->trim_log();

// adjust acting set? (e.g. because backfill completed...)
bool history_les_bound = false;
if (pg->acting != pg->up && !pg->choose_acting(auth_log_shard,
Expand Down
1 change: 0 additions & 1 deletion src/osd/PG.h
Expand Up @@ -2887,7 +2887,6 @@ class PG : public DoutPrefixProvider {
bool transaction_applied = true,
bool async = false);
bool check_log_for_corruption(ObjectStore *store);
void trim_log();

std::string get_corrupt_pg_log_name() const;

Expand Down