[chore](be) reduce log when trying to do async write cooldown meta (#18107)

This commit is contained in:
AlexYue
2023-03-26 11:10:21 +08:00
committed by GitHub
parent 5846b3fc54
commit c63807ccfe

View File

@ -127,6 +127,13 @@ WriteCooldownMetaExecutors::WriteCooldownMetaExecutors(size_t executor_nums)
void WriteCooldownMetaExecutors::WriteCooldownMetaExecutors::submit(TabletSharedPtr tablet) {
auto tablet_id = tablet->tablet_id();
{
std::shared_lock rdlock(tablet->get_header_lock());
if (!tablet->tablet_meta()->cooldown_meta_id().initialized()) {
VLOG_NOTICE << "tablet " << tablet_id << " is not cooldown replica";
return;
}
}
{
// one tablet could at most have one cooldown task to be done
std::unique_lock<std::mutex> lck {_latch};
@ -145,11 +152,13 @@ void WriteCooldownMetaExecutors::WriteCooldownMetaExecutors::submit(TabletShared
if (s.ok()) {
return;
}
LOG_WARNING("write tablet {} cooldown meta failed because: {}", t->tablet_id(),
s.to_string());
if (!s.is<ABORTED>()) {
LOG_EVERY_SECOND(WARNING)
<< "write tablet " << t->tablet_id() << " cooldown meta failed because: " << s;
submit(t);
return;
}
VLOG_DEBUG << "tablet " << t->tablet_id() << " is not cooldown replica";
};
_executors[_get_executor_pos(tablet_id)]->submit_func(