Minor fix

pull/6763/head
Halil Ozan Akgul 2023-03-06 17:16:06 +03:00
parent f7a479d2e4
commit 4ebac440f9
2 changed files with 15 additions and 5 deletions

View File

@ -291,8 +291,8 @@ AttributeMetricsIfApplicable()
while(tenantIndex != 0 && monitor->tenants[tenantIndex-1].score < tenantStats->score)
{
LWLockAcquire(&monitor->tenants[tenantIndex-1].lock, LW_EXCLUSIVE);
// we need to reduce previous tenants score too !!!!!!!!
elog(WARNING, "swap = %d, %d", tenantIndex, tenantIndex-1);
ReduceScoreIfNecessary(monitor, monitor->tenants[tenantIndex-1], queryTime);
TenantStats tempTenant = monitor->tenants[tenantIndex];
monitor->tenants[tenantIndex] = monitor->tenants[tenantIndex - 1];
@ -548,6 +548,10 @@ FindTenantStats(MultiTenantMonitor *monitor)
}
/*
* MultiTenantMonitorshmemSize calculates the size of the multi tenant monitor using
* CitusStatsTenantsLimit parameter.
*/
static size_t
MultiTenantMonitorshmemSize(void)
{

View File

@ -1,6 +1,12 @@
//
// Created by Nils Dijk on 02/12/2022.
//
/*-------------------------------------------------------------------------
*
* attribute.h
* Routines related to the multi tenant monitor.
*
* Copyright (c) Citus Data, Inc.
*
*-------------------------------------------------------------------------
*/
#ifndef CITUS_ATTRIBUTE_H
#define CITUS_ATTRIBUTE_H