Skip to content

Commit

Permalink
Merge pull request ceph#15558 from Linbing/wip-osd-optimize-send-failues
Browse files Browse the repository at this point in the history
osd: when osd in not in failure_pending, we don't need to get osd inst from osdmap.

Reviewed-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov authored Jun 9, 2017
2 parents 41a90b9 + 1eae74e commit ab43b0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5881,8 +5881,8 @@ void OSD::send_failures()
utime_t now = ceph_clock_now();
while (!failure_queue.empty()) {
int osd = failure_queue.begin()->first;
entity_inst_t i = osdmap->get_inst(osd);
if (!failure_pending.count(osd)) {
entity_inst_t i = osdmap->get_inst(osd);
int failed_for = (int)(double)(now - failure_queue.begin()->second);
monc->send_mon_message(new MOSDFailure(monc->get_fsid(), i, failed_for,
osdmap->get_epoch()));
Expand Down

0 comments on commit ab43b0d

Please sign in to comment.