Skip to content

Commit da61d32

Browse files
authored
maint: remove deprecated config options (#1689)
## Which problem is this PR solving? This PR removes several deprecated configuration options from Refinery. These changes clean up the configuration API by removing functionality that was either deprecated or no longer needed. This PR only removes the config options. The actual code logic removal will be done in the future release ## Short description of the changes Configuration Removal: - BufferSizes section: Completely removed BufferSizes configuration group including: - UpstreamBufferSize - PeerBufferSize - Collection section cleanup: Removed several fields that were part of the TraceLocalityMode feature: - DisableRedistribution - RedistributionDelay - MaxDropDecisionBatchSize - DropDecisionSendInterval - MaxKeptDecisionBatchSize - KeptDecisionSendInterval
1 parent b6ccb02 commit da61d32

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

collect/stress_relief_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ func newStressRelief(t *testing.T, clock clockwork.Clock, channel pubsub.PubSub)
330330

331331
sr := &StressRelief{
332332
Clock: clock,
333+
Done: make(chan struct{}),
333334
Logger: logger,
334335
RefineryMetrics: metric,
335336
PubSub: channel,
@@ -338,6 +339,7 @@ func newStressRelief(t *testing.T, clock clockwork.Clock, channel pubsub.PubSub)
338339
}
339340

340341
return sr, func() {
342+
close(sr.Done)
341343
require.NoError(t, healthReporter.Stop())
342344
require.NoError(t, channel.Stop())
343345
}

config/config_serializer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ func populateConfigContents(cfg Config) configContents {
6464
PeerManagement: getPeerManagementConfig(cfg),
6565
RedisPeerManagement: cfg.GetRedisPeerManagement(),
6666
Collection: cfg.GetCollectionConfig(),
67-
BufferSizes: BufferSizeConfig{},
6867
Specialized: SpecializedConfig{
6968
EnvironmentCacheTTL: Duration(cfg.GetEnvironmentCacheTTL()),
7069
CompressPeerCommunication: getDefaultTrueValue(cfg.GetCompressPeerCommunication()),

config/file_config.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ type configContents struct {
6262
PeerManagement PeerManagementConfig `yaml:"PeerManagement"`
6363
RedisPeerManagement RedisPeerManagementConfig `yaml:"RedisPeerManagement"`
6464
Collection CollectionConfig `yaml:"Collection"`
65-
BufferSizes BufferSizeConfig `yaml:"BufferSizes"`
6665
Specialized SpecializedConfig `yaml:"Specialized"`
6766
IDFieldNames IDFieldsConfig `yaml:"IDFields"`
6867
GRPCServerParameters GRPCServerParameters `yaml:"GRPCServerParameters"`
@@ -319,8 +318,8 @@ type CollectionConfig struct {
319318
MaxMemoryPercentage int `yaml:"MaxMemoryPercentage" default:"75"`
320319
MaxAlloc MemorySize `yaml:"MaxAlloc"`
321320

322-
DisableRedistribution *DefaultTrue `yaml:"DisableRedistribution" default:"true"` // Avoid pointer woe on access, use GetDisableRedistribution() instead.
323-
RedistributionDelay Duration `yaml:"RedistributionDelay" default:"30s"`
321+
DisableRedistribution *DefaultTrue `yaml:"-"` // Avoid pointer woe on access, use GetDisableRedistribution() instead.
322+
RedistributionDelay Duration `yaml:"-"`
324323

325324
ShutdownDelay Duration `yaml:"ShutdownDelay" default:"15s"`
326325
TraceLocalityMode string `yaml:"-"`
@@ -367,8 +366,6 @@ func (c CollectionConfig) TraceLocalityEnabled() bool {
367366
}
368367
}
369368

370-
type BufferSizeConfig struct{}
371-
372369
type SpecializedConfig struct {
373370
EnvironmentCacheTTL Duration `yaml:"EnvironmentCacheTTL" default:"1h"`
374371
CompressPeerCommunication *DefaultTrue `yaml:"CompressPeerCommunication" default:"true"` // Avoid pointer woe on access, use GetCompressPeerCommunication() instead.

config/metadata/configMeta.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ groups:
13651365
type: defaulttrue
13661366
valuetype: nondefault
13671367
firstversion: v2.8
1368+
lastversion: v2.9.7
13681369
default: true
13691370
reload: true
13701371
summary: controls whether to transmit traces in cache to remaining peers during cluster scaling event.
@@ -1383,6 +1384,7 @@ groups:
13831384
type: duration
13841385
valuetype: nondefault
13851386
firstversion: v2.9
1387+
lastversion: v2.9.7
13861388
default: 30s
13871389
reload: false
13881390
summary: controls the amount of time Refinery waits after each cluster scaling event before redistributing in-memory traces.
@@ -1505,6 +1507,7 @@ groups:
15051507
15061508
- name: BufferSizes
15071509
title: "Buffer Sizes"
1510+
lastversion: v2.9.7
15081511
description: >
15091512
contains the settings that are relevant to
15101513
the sizes of communications buffers.
@@ -1514,7 +1517,6 @@ groups:
15141517
valuetype: nondefault
15151518
default: 10_000
15161519
reload: true
1517-
lastversion: v2.9.7
15181520
validations:
15191521
- type: minimum
15201522
arg: 1_000
@@ -1530,7 +1532,6 @@ groups:
15301532
valuetype: nondefault
15311533
default: 100_000
15321534
reload: true
1533-
lastversion: v2.9.7
15341535
validations:
15351536
- type: minimum
15361537
arg: 10_000

0 commit comments

Comments
 (0)