pull/6763/head
Halil Ozan Akgul 2023-03-10 11:14:05 +03:00
parent c1a67c9aca
commit ba32f827a9
1 changed files with 2 additions and 3 deletions

View File

@ -311,7 +311,7 @@ AttributeMetricsIfApplicable()
* After updating the score we might need to change the rank of the tenant in the monitor
*/
while (tenantIndex != 0 &&
monitor->tenants[tenantIndex - 1].score < tenantStats->score)
monitor->tenants[tenantIndex - 1].score < monitor->tenants[tenantIndex]->score)
{
LWLockAcquire(&monitor->tenants[tenantIndex - 1].lock, LW_EXCLUSIVE);
@ -325,9 +325,8 @@ AttributeMetricsIfApplicable()
LWLockRelease(&monitor->tenants[tenantIndex].lock);
tenantIndex--;
tenantStats = &monitor->tenants[tenantIndex];
}
tenantStats = &monitor->tenants[tenantIndex];
if (attributeCommandType == CMD_SELECT)
{