SocketConnection::~SocketConnection()
{
// errors were reported to callers of send()
- assert(send_ready.available());
+ ceph_assert(send_ready.available());
send_ready.ignore_ready_future();
}
if (seq <= in_seq) {
if (HAVE_FEATURE(features, RECONNECT_SEQ) &&
conf.ms_die_on_old_message) {
- assert(0 == "old msgs despite reconnect_seq feature");
+ ceph_assert(0 == "old msgs despite reconnect_seq feature");
}
return false;
} else if (seq > in_seq + 1) {
if (conf.ms_die_on_skipped_message) {
- assert(0 == "skipped incoming seq");
+ ceph_assert(0 == "skipped incoming seq");
}
return false;
} else {
h.global_seq = get_messenger()->get_global_seq(h.reply.global_seq);
return seastar::now();
case CEPH_MSGR_TAG_RETRY_SESSION:
- assert(h.reply.connect_seq > h.connect_seq);
+ ceph_assert(h.reply.connect_seq > h.connect_seq);
h.connect_seq = h.reply.connect_seq;
return seastar::now();
case CEPH_MSGR_TAG_WAIT:
}).then([this] (bufferlist bl) {
auto p = bl.cbegin();
::decode(h.reply, p);
- assert(p.end());
+ ceph_assert(p.end());
return read(h.reply.authorizer_len);
}).then([this] (bufferlist bl) {
if (h.authorizer) {
entity_addr_t saddr, caddr;
::decode(saddr, p);
::decode(caddr, p);
- assert(p.end());
+ ceph_assert(p.end());
validate_peer_addr(saddr, peer_addr);
if (my_addr != caddr) {
validate_banner(p);
entity_addr_t addr;
::decode(addr, p);
- assert(p.end());
+ ceph_assert(p.end());
if (!addr.is_blank_ip()) {
peer_addr = addr;
}
{
auto [i, added] = connections.emplace(conn->get_peer_addr(), conn);
std::ignore = i;
- assert(added);
+ ceph_assert(added);
return seastar::repeat([=] {
return conn->read_message()
void SocketMessenger::unregister_conn(ConnectionRef conn)
{
- assert(conn);
+ ceph_assert(conn);
auto found = connections.find(conn->get_peer_addr());
- assert(found != connections.end());
- assert(found->second == conn);
+ ceph_assert(found != connections.end());
+ ceph_assert(found->second == conn);
connections.erase(found);
}
#include "crimson/net/Config.h"
#include "include/intarith.h"
+#include "include/assert.h"
+
namespace ceph::thread {
ThreadPool::ThreadPool(size_t n_threads,
CPU_SET(cpu_id, &cs);
[[maybe_unused]] auto r = pthread_setaffinity_np(pthread_self(),
sizeof(cs), &cs);
- assert(r == 0);
+ ceph_assert(r == 0);
}
void ThreadPool::loop()