chore: remove US history pruner feature toggle (#114014)
This commit is contained in:
committed by
GitHub
parent
da5af29218
commit
32da63a20f
@@ -62,10 +62,6 @@ type BackendOptions struct {
|
||||
IsHA bool
|
||||
storageMetrics *resource.StorageMetrics
|
||||
|
||||
// If true, the backend will prune history on write events.
|
||||
// Will be removed once fully rolled out.
|
||||
withPruner bool
|
||||
|
||||
// testing
|
||||
SimulatedNetworkLatency time.Duration // slows down the create transactions by a fixed amount
|
||||
|
||||
@@ -101,7 +97,6 @@ func NewBackend(opts BackendOptions) (Backend, error) {
|
||||
storageMetrics: opts.storageMetrics,
|
||||
bulkLock: &bulkLock{running: make(map[string]bool)},
|
||||
simulatedNetworkLatency: opts.SimulatedNetworkLatency,
|
||||
withPruner: opts.withPruner,
|
||||
lastImportTimeMaxAge: opts.LastImportTimeMaxAge,
|
||||
}, nil
|
||||
}
|
||||
@@ -141,7 +136,6 @@ type backend struct {
|
||||
simulatedNetworkLatency time.Duration
|
||||
|
||||
historyPruner resource.Pruner
|
||||
withPruner bool
|
||||
|
||||
lastImportTimeMaxAge time.Duration
|
||||
lastImportTimeDeletionTime atomic.Time
|
||||
@@ -198,11 +192,6 @@ func (b *backend) initLocked(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (b *backend) initPruner(ctx context.Context) error {
|
||||
if !b.withPruner {
|
||||
b.log.Debug("using noop history pruner")
|
||||
b.historyPruner = &resource.NoopPruner{}
|
||||
return nil
|
||||
}
|
||||
b.log.Debug("using debounced history pruner")
|
||||
// Initialize history pruner.
|
||||
pruner, err := debouncer.NewGroup(debouncer.DebouncerOpts[resource.PruningKey]{
|
||||
|
||||
@@ -98,15 +98,12 @@ func NewResourceServer(opts ServerOptions) (resource.ResourceServer, error) {
|
||||
|
||||
isHA := isHighAvailabilityEnabled(opts.Cfg.SectionWithEnvOverrides("database"),
|
||||
opts.Cfg.SectionWithEnvOverrides("resource_api"))
|
||||
//nolint:staticcheck // not yet migrated to OpenFeature
|
||||
withPruner := opts.Features.IsEnabledGlobally(featuremgmt.FlagUnifiedStorageHistoryPruner)
|
||||
|
||||
backend, err := NewBackend(BackendOptions{
|
||||
DBProvider: eDB,
|
||||
Tracer: opts.Tracer,
|
||||
Reg: opts.Reg,
|
||||
IsHA: isHA,
|
||||
withPruner: withPruner,
|
||||
storageMetrics: opts.StorageMetrics,
|
||||
LastImportTimeMaxAge: opts.SearchOptions.MaxIndexAge, // No need to keep last_import_times older than max index age.
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user