Remove QUIC_LOG(ERROR) from quic_alarm.cc destructor
This error message appears in an extraordinary number of Chrome tests, making the logs unreadable and making things difficult to debug. It also makes a lot of tests much slower because stack trace collection can be expensive on some platforms (see https://bugs.chromium.org/p/chromium/issues/detail?id=1256864).
PiperOrigin-RevId: 401569196
diff --git a/quic/core/quic_alarm.cc b/quic/core/quic_alarm.cc
index 37d563f..7419159 100644
--- a/quic/core/quic_alarm.cc
+++ b/quic/core/quic_alarm.cc
@@ -19,12 +19,6 @@
QuicAlarm::~QuicAlarm() {
if (IsSet()) {
QUIC_CODE_COUNT(quic_alarm_not_cancelled_in_dtor);
- static std::atomic<uint64_t> hit_count{0};
- uint64_t old_count = hit_count.fetch_add(1, std::memory_order_relaxed);
- if ((old_count & (old_count + 1)) == 0) {
- QUIC_LOG(ERROR) << "QuicAlarm not cancelled at destruction. "
- << QuicStackTrace();
- }
}
}