From 0d2ad7f68ee3af9c6246d91c3bb98de3e33dc7ff Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Fri, 13 Jan 2023 14:31:54 +0600 Subject: [PATCH] PMM-11387 Fixed calculation for gcache setting depending on memory size available (#1563) * PMM-11387 Fixed resource types from DecimalSI to BinarySI DecimalSI calculation does not work for PXC clusters with fraction values. PXC gives the calculated "2.4G" is not valid and if I manually override that to 3G it is working fine. * Revert "PMM-11387 Fixed resource types from DecimalSI to BinarySI" This reverts commit 4a365029a2e26947121f540ba8f608b01aff79c8. * PMM-11387 Fixed gcache calculation depending of size of cluster --- managed/services/dbaas/kubernetes/types.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/managed/services/dbaas/kubernetes/types.go b/managed/services/dbaas/kubernetes/types.go index b6d3c1da87..ddb84f684c 100644 --- a/managed/services/dbaas/kubernetes/types.go +++ b/managed/services/dbaas/kubernetes/types.go @@ -109,13 +109,13 @@ func DatabaseClusterForPXC(cluster *dbaasv1beta1.CreatePXCClusterRequest, cluste clusterMemory := resource.NewQuantity(cluster.Params.Pxc.ComputeResources.MemoryBytes, resource.DecimalSI) if cluster.Params.Pxc.Configuration == "" { if memory > memorySmallSize && memory <= memoryMediumSize { - gCacheSize = "2.4G" + gCacheSize = "2457M" } if memory > memoryMediumSize && memory <= memoryLargeSize { - gCacheSize = "9.6G" + gCacheSize = "9830M" } if memory > memoryLargeSize { - gCacheSize = "9.6G" + gCacheSize = "9830M" } cluster.Params.Pxc.Configuration = fmt.Sprintf(pxcDefaultConfigurationTemplate, gCacheSize) }