Skip to content

Commit

Permalink
PMM-11387 Fixed calculation for gcache setting depending on memory si…
Browse files Browse the repository at this point in the history
…ze 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 4a36502.

* PMM-11387 Fixed gcache calculation depending of size of cluster
  • Loading branch information
gen1us2k committed Jan 13, 2023
1 parent eb93754 commit c5c8758
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions managed/services/dbaas/kubernetes/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c5c8758

Please sign in to comment.