@@ -1247,7 +1247,7 @@ void PeeringState::send_lease()
12471247
12481248void PeeringState::proc_lease (const pg_lease_t & l)
12491249{
1250- assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
1250+ ceph_assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
12511251 if (!is_nonprimary ()) {
12521252 psdout (20 ) << " no-op, !nonprimary" << dendl;
12531253 return ;
@@ -1289,7 +1289,7 @@ void PeeringState::proc_lease(const pg_lease_t& l)
12891289
12901290void PeeringState::proc_lease_ack (int from, const pg_lease_ack_t & a)
12911291{
1292- assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
1292+ ceph_assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
12931293 auto now = pl->get_mnow ();
12941294 bool was_min = false ;
12951295 for (unsigned i = 0 ; i < acting.size (); ++i) {
@@ -1315,7 +1315,7 @@ void PeeringState::proc_lease_ack(int from, const pg_lease_ack_t& a)
13151315
13161316void PeeringState::proc_renew_lease ()
13171317{
1318- assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
1318+ ceph_assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
13191319 renew_lease (pl->get_mnow ());
13201320 if (actingset.size () > 1 ) {
13211321 send_lease ();
@@ -1327,7 +1327,7 @@ void PeeringState::proc_renew_lease()
13271327
13281328void PeeringState::recalc_readable_until ()
13291329{
1330- assert (is_primary ());
1330+ ceph_assert (is_primary ());
13311331 ceph::signedspan min = readable_until_ub_sent;
13321332 for (unsigned i = 0 ; i < acting.size (); ++i) {
13331333 if (acting[i] == pg_whoami.osd || acting[i] == CRUSH_ITEM_NONE) {
@@ -1347,7 +1347,7 @@ void PeeringState::recalc_readable_until()
13471347
13481348bool PeeringState::check_prior_readable_down_osds (const OSDMapRef& map)
13491349{
1350- assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
1350+ ceph_assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
13511351 bool changed = false ;
13521352 auto p = prior_readable_down_osds.begin ();
13531353 while (p != prior_readable_down_osds.end ()) {
@@ -1762,7 +1762,7 @@ PeeringState::select_replicated_primary(
17621762 !primary->second .is_incomplete () &&
17631763 primary->second .last_update >=
17641764 auth_log_shard->second .log_tail ) {
1765- assert (HAVE_FEATURE (osdmap->get_up_osd_features (), SERVER_NAUTILUS));
1765+ ceph_assert (HAVE_FEATURE (osdmap->get_up_osd_features (), SERVER_NAUTILUS));
17661766 auto approx_missing_objects =
17671767 primary->second .stats .stats .sum .num_objects_missing ;
17681768 auto auth_version = auth_log_shard->second .last_update .version ;
@@ -1961,7 +1961,7 @@ class bucket_candidates_t {
19611961public:
19621962 void add_osd (osd_ord_t ord, osd_id_t osd) {
19631963 // osds will be added in smallest to largest order
1964- assert (osds.empty () || osds.back ().first <= ord);
1964+ ceph_assert (osds.empty () || osds.back ().first <= ord);
19651965 osds.push_back (std::make_pair (ord, osd));
19661966 }
19671967 osd_id_t pop_osd () {
@@ -2295,7 +2295,7 @@ void PeeringState::choose_async_recovery_ec(
22952295 // past the authoritative last_update the same as those equal to it.
22962296 version_t auth_version = auth_info.last_update .version ;
22972297 version_t candidate_version = shard_info.last_update .version ;
2298- assert (HAVE_FEATURE (osdmap->get_up_osd_features (), SERVER_NAUTILUS));
2298+ ceph_assert (HAVE_FEATURE (osdmap->get_up_osd_features (), SERVER_NAUTILUS));
22992299 auto approx_missing_objects =
23002300 shard_info.stats .stats .sum .num_objects_missing ;
23012301 if (auth_version > candidate_version) {
@@ -2353,7 +2353,7 @@ void PeeringState::choose_async_recovery_replicated(
23532353 // logs plus historical missing objects as the cost of recovery
23542354 version_t auth_version = auth_info.last_update .version ;
23552355 version_t candidate_version = shard_info.last_update .version ;
2356- assert (HAVE_FEATURE (osdmap->get_up_osd_features (), SERVER_NAUTILUS));
2356+ ceph_assert (HAVE_FEATURE (osdmap->get_up_osd_features (), SERVER_NAUTILUS));
23572357 auto approx_missing_objects =
23582358 shard_info.stats .stats .sum .num_objects_missing ;
23592359 if (auth_version > candidate_version) {
@@ -2886,7 +2886,7 @@ void PeeringState::activate(
28862886 purged.intersection_of (to_trim, info.purged_snaps );
28872887 to_trim.subtract (purged);
28882888
2889- assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
2889+ ceph_assert (HAVE_FEATURE (upacting_features, SERVER_OCTOPUS));
28902890 renew_lease (pl->get_mnow ());
28912891 // do not schedule until we are actually activated
28922892
@@ -4584,7 +4584,7 @@ void PeeringState::recover_got(
45844584 psdout (10 ) << " last_complete now " << info.last_complete
45854585 << " log.complete_to at end" << dendl;
45864586 // below is not true in the repair case.
4587- // assert (missing.num_missing() == 0); // otherwise, complete_to was wrong.
4587+ // ceph_assert (missing.num_missing() == 0); // otherwise, complete_to was wrong.
45884588 ceph_assert (info.last_complete == info.last_update );
45894589 }
45904590
@@ -4774,8 +4774,8 @@ void PeeringState::calc_trim_to()
47744774 }
47754775 psdout (10 ) << " calc_trim_to " << pg_trim_to << " -> " << new_trim_to << dendl;
47764776 pg_trim_to = new_trim_to;
4777- assert (pg_trim_to <= pg_log.get_head ());
4778- assert (pg_trim_to <= min_last_complete_ondisk);
4777+ ceph_assert (pg_trim_to <= pg_log.get_head ());
4778+ ceph_assert (pg_trim_to <= min_last_complete_ondisk);
47794779 }
47804780}
47814781
@@ -6584,7 +6584,7 @@ boost::statechart::result PeeringState::Active::react(const AllReplicasActivated
65846584 if (merge_target) {
65856585 pg_t src = pgid;
65866586 src.set_ps (ps->pool .info .get_pg_num_pending ());
6587- assert (src.get_parent () == pgid);
6587+ ceph_assert (src.get_parent () == pgid);
65886588 pl->set_not_ready_to_merge_target (pgid, src);
65896589 } else {
65906590 pl->set_not_ready_to_merge_source (pgid);
@@ -6679,7 +6679,7 @@ void PeeringState::Active::all_activated_and_committed()
66796679 ceph_assert (!ps->acting_recovery_backfill .empty ());
66806680 ceph_assert (ps->blocked_by .empty ());
66816681
6682- assert (HAVE_FEATURE (ps->upacting_features , SERVER_OCTOPUS));
6682+ ceph_assert (HAVE_FEATURE (ps->upacting_features , SERVER_OCTOPUS));
66836683 // this is overkill when the activation is quick, but when it is slow it
66846684 // is important, because the lease was renewed by the activate itself but we
66856685 // don't know how long ago that was, and simply scheduling now may leave
@@ -8069,7 +8069,7 @@ std::vector<pg_shard_t> PeeringState::get_replica_recovery_order() const
80698069 continue ;
80708070 }
80718071 auto pm = get_peer_missing ().find (p);
8072- assert (pm != get_peer_missing ().end ());
8072+ ceph_assert (pm != get_peer_missing ().end ());
80738073 auto nm = pm->second .num_missing ();
80748074 if (nm != 0 ) {
80758075 if (is_async_recovery_target (p)) {
0 commit comments