Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT 2.20][#21096] DocDB: Avoid fatal due to narrow_cast during …
…ListTabletServers Summary: Original commit: aa2efd7 / D32496 During ListTabletServers, we occasionally experience a FATAL with the following stack whenever the last heartbeat was > 24 days ago. While this is a remote possibility, it is still a possibility. So as part of ListTabletServers, if the last heartbeat is more than int32 max milliseconds, we just set it to int32 max. ``` F20240207 16:26:17 ../../src/yb/gutil/casts.cc:21] Bad narrow cast: 2205994749 > 2147483647 @ 0x55e4d34d1257 google::LogMessage::SendToLog() @ 0x55e4d34d219d google::LogMessage::Flush() @ 0x55e4d34d2819 google::LogMessageFatal::~LogMessageFatal() @ 0x55e4d3cd4c69 yb::BadNarrowCast() @ 0x55e4d3741898 yb::narrow_cast<>() @ 0x55e4d3f163aa yb::master::(anonymous namespace)::MasterClusterServiceImpl::ListTabletServers() @ 0x55e4d414a455 std::__1::__function::__func<>::operator()() @ 0x55e4d414b33f yb::master::MasterClusterIf::Handle() @ 0x55e4d44aaeda yb::rpc::ServicePoolImpl::Handle() @ 0x55e4d43ea97f yb::rpc::InboundCall::InboundCallTask::Run() @ 0x55e4d44b9a73 yb::rpc::(anonymous namespace)::Worker::Execute() @ 0x55e4d4b8ab02 yb::Thread::SuperviseThread() @ 0x7f8ebad27694 start_thread @ 0x7f8ebb22941d __clone ``` Jira: DB-10056 Test Plan: MasterTest.TestRegisterAndHeartbeat Reviewers: bkolagani, arybochkin Reviewed By: bkolagani Subscribers: bogdan, ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D32600
- Loading branch information