Caching: Add feature toggle for memory efficient cache payload serialization (#76145)

* add feature toggle for smart cache serialization

* re-add toggle after merge conflict

* switch feature toggle stage to experimental

* incorporate PR feedback
This commit is contained in:
Michael Mandrus
2023-10-12 19:56:49 +03:00
committed by GitHub
parent 5a79e70d20
commit 94ce87571d
5 changed files with 117 additions and 103 deletions
+10 -3
View File
@@ -236,7 +236,7 @@ var (
},
{
Name: "nestedFolderPicker",
Description: "Enables the new folder picker to work with nested folders. Requires the nestedFolders feature flag",
Description: "Enables the new folder picker to work with nested folders. Requires the nestedFolders feature toggle",
Stage: FeatureStageGeneralAvailability,
Owner: grafanaFrontendPlatformSquad,
FrontendOnly: true,
@@ -346,7 +346,7 @@ var (
},
{
Name: "prometheusDataplane",
Description: "Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present.",
Description: "Changes responses to from Prometheus to be compliant with the dataplane specification. In particular, when this feature toggle is active, the numeric `Field.Name` is set from 'Value' to the value of the `__name__` label.",
Expression: "true",
Stage: FeatureStageGeneralAvailability,
Owner: grafanaObservabilityMetricsSquad,
@@ -431,7 +431,7 @@ var (
},
{
Name: "useCachingService",
Description: "When turned on, the new query and resource caching implementation using a wire service inject will be used in place of the previous middleware implementation",
Description: "When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation.",
Stage: FeatureStageGeneralAvailability,
Owner: grafanaOperatorExperienceSquad,
RequiresRestart: true,
@@ -867,5 +867,12 @@ var (
FrontendOnly: true,
Owner: awsDatasourcesSquad,
},
{
Name: "cachingOptimizeSerializationMemoryUsage",
Description: "If enabled, the caching backend gradually serializes query responses for the cache, comparing against the configured `[caching]max_value_mb` value as it goes. This can can help prevent Grafana from running out of memory while attempting to cache very large query responses.",
Stage: FeatureStageExperimental,
Owner: grafanaOperatorExperienceSquad,
FrontendOnly: false,
},
}
)
+1
View File
@@ -123,3 +123,4 @@ kubernetesPlaylists,experimental,@grafana/grafana-app-platform-squad,false,false
navAdminSubsections,experimental,@grafana/grafana-frontend-platform,false,false,false,false
recoveryThreshold,experimental,@grafana/alerting-squad,false,false,true,false
awsDatasourcesNewFormStyling,experimental,@grafana/aws-datasources,false,false,false,true
cachingOptimizeSerializationMemoryUsage,experimental,@grafana/grafana-operator-experience-squad,false,false,false,false
1 Name Stage Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
123 navAdminSubsections experimental @grafana/grafana-frontend-platform false false false false
124 recoveryThreshold experimental @grafana/alerting-squad false false true false
125 awsDatasourcesNewFormStyling experimental @grafana/aws-datasources false false false true
126 cachingOptimizeSerializationMemoryUsage experimental @grafana/grafana-operator-experience-squad false false false false
+7 -3
View File
@@ -144,7 +144,7 @@ const (
FlagNestedFolders = "nestedFolders"
// FlagNestedFolderPicker
// Enables the new folder picker to work with nested folders. Requires the nestedFolders feature flag
// Enables the new folder picker to work with nested folders. Requires the nestedFolders feature toggle
FlagNestedFolderPicker = "nestedFolderPicker"
// FlagAccessTokenExpirationCheck
@@ -208,7 +208,7 @@ const (
FlagClientTokenRotation = "clientTokenRotation"
// FlagPrometheusDataplane
// Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present.
// Changes responses to from Prometheus to be compliant with the dataplane specification. In particular, when this feature toggle is active, the numeric `Field.Name` is set from 'Value' to the value of the `__name__` label.
FlagPrometheusDataplane = "prometheusDataplane"
// FlagLokiMetricDataplane
@@ -260,7 +260,7 @@ const (
FlagRefactorVariablesTimeRange = "refactorVariablesTimeRange"
// FlagUseCachingService
// When turned on, the new query and resource caching implementation using a wire service inject will be used in place of the previous middleware implementation
// When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation.
FlagUseCachingService = "useCachingService"
// FlagEnableElasticsearchBackendQuerying
@@ -502,4 +502,8 @@ const (
// FlagAwsDatasourcesNewFormStyling
// Applies new form styling for configuration and query editors in AWS plugins
FlagAwsDatasourcesNewFormStyling = "awsDatasourcesNewFormStyling"
// FlagCachingOptimizeSerializationMemoryUsage
// If enabled, the caching backend gradually serializes query responses for the cache, comparing against the configured `[caching]max_value_mb` value as it goes. This can can help prevent Grafana from running out of memory while attempting to cache very large query responses.
FlagCachingOptimizeSerializationMemoryUsage = "cachingOptimizeSerializationMemoryUsage"
)