Fix a bug that heartbeat thread may be stuck due to deadlock
This commit is contained in:
Родитель
6130db6eb7
Коммит
0731b03962
|
@ -641,6 +641,7 @@ namespace hpc
|
|||
{ "2.5.0.0",
|
||||
{
|
||||
"Update building environment (from cpprest2.8 on ubuntu1404 with system gnu libs to cpprest2.10 on ubuntu1804) to fix memory leak issue",
|
||||
"Fix a bug that heartbeat thread may be stuck due to deadlock",
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -617,7 +617,7 @@ void RemoteExecutor::StartHeartbeat()
|
|||
|
||||
void RemoteExecutor::UpdateStatistics()
|
||||
{
|
||||
Logger::Debug(0, 0, 0, "Updating tasks' statistics.");
|
||||
Logger::Info("Update tasks' statistics.");
|
||||
|
||||
auto* table = JobTaskTable::GetInstance();
|
||||
if (table != nullptr)
|
||||
|
@ -625,6 +625,7 @@ void RemoteExecutor::UpdateStatistics()
|
|||
auto tasks = table->GetAllTasks();
|
||||
for (const auto& taskInfo : tasks)
|
||||
{
|
||||
ReaderLock readerLock(&this->lock);
|
||||
auto p = this->processes.find(taskInfo->ProcessKey);
|
||||
if (p != this->processes.end())
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче