Migration from EPOLL_BUG to EPOLL_BUG_V2(bug_id).
Per go/gfe-bug-improvements GFE_BUGs are getting stable IDs to allow for monitoring and alerting. Existing EPOLL_BUG instances are changed to have `epoll_bug_n_m` ID, where `n` is unique for each file, and `m` is a counter within each file, so we get `EPOLL_BUG_V2(epoll_bug_123_2))`
PiperOrigin-RevId: 362507292
Change-Id: Ic45f8ef9c414b66d8ff85fb2761d1c81d6178e85
diff --git a/epoll_server/platform/api/epoll_bug.h b/epoll_server/platform/api/epoll_bug.h
index 33a3478..21ac1ed 100644
--- a/epoll_server/platform/api/epoll_bug.h
+++ b/epoll_server/platform/api/epoll_bug.h
@@ -8,5 +8,8 @@
#include "net/tools/epoll_server/platform/impl/epoll_bug_impl.h"
#define EPOLL_BUG EPOLL_BUG_IMPL
+// V2 macro is the same as the EPOLL_BUG above, but it takes a
+// bug_id parameter.
+#define EPOLL_BUG_V2 EPOLL_BUG_V2_IMPL
#endif // QUICHE_EPOLL_SERVER_PLATFORM_API_EPOLL_BUG_H_
diff --git a/epoll_server/simple_epoll_server.cc b/epoll_server/simple_epoll_server.cc
index 09831db..7753740 100644
--- a/epoll_server/simple_epoll_server.cc
+++ b/epoll_server/simple_epoll_server.cc
@@ -444,7 +444,7 @@
EPOLL_VLOG(4) << "RegisteringAlarm " << ac << " at : " << timeout_time_in_us;
CHECK(ac);
if (all_alarms_.find(ac) != all_alarms_.end()) {
- EPOLL_BUG << "Alarm already exists";
+ EPOLL_BUG_V2(epoll_bug_1_1) << "Alarm already exists";
}
auto alarm_iter = alarm_map_.insert(std::make_pair(timeout_time_in_us, ac));