Skip to content

Commit

Permalink
Merge PR #23354 into master
Browse files Browse the repository at this point in the history
* refs/pull/23354/head:
	src/osd/PG.cc: remove redundant call to trim_log()

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jul 31, 2018
2 parents 34698a2 + 283b0bd commit 0aba0f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
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

0 comments on commit 0aba0f4

Please sign in to comment.