mirror of
https://github.com/ceph/ceph
synced 2025-01-31 15:32:38 +00:00
Merge pull request #12579 from hjwsm1989/smallfix
osd/PG: check the connection first in fulfill_log Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
aa43ed3930
@ -4825,6 +4825,9 @@ void PG::fulfill_log(
|
||||
dout(10) << "log request from " << from << dendl;
|
||||
assert(from == primary);
|
||||
assert(query.type != pg_query_t::INFO);
|
||||
ConnectionRef con = osd->get_con_osd_cluster(
|
||||
from.osd, get_osdmap()->get_epoch());
|
||||
if (!con) return;
|
||||
|
||||
MOSDPGLog *mlog = new MOSDPGLog(
|
||||
from.shard, pg_whoami.shard,
|
||||
@ -4851,14 +4854,8 @@ void PG::fulfill_log(
|
||||
|
||||
dout(10) << " sending " << mlog->log << " " << mlog->missing << dendl;
|
||||
|
||||
ConnectionRef con = osd->get_con_osd_cluster(
|
||||
from.osd, get_osdmap()->get_epoch());
|
||||
if (con) {
|
||||
osd->share_map_peer(from.osd, con.get(), get_osdmap());
|
||||
osd->send_message_osd_cluster(mlog, con.get());
|
||||
} else {
|
||||
mlog->put();
|
||||
}
|
||||
osd->share_map_peer(from.osd, con.get(), get_osdmap());
|
||||
osd->send_message_osd_cluster(mlog, con.get());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user