Cleanup old entries from resource_last_import_time table. (#112438)

* Cleanup old entries from resource_last_import_time table.

* Add index for last_import_time column.

* Address review feedback.
This commit is contained in:
Peter Štibraný
2025-10-23 11:17:08 +00:00
committed by GitHub
parent 9021719437
commit a4aa3529c8
10 changed files with 82 additions and 8 deletions
+7 -6
View File
@@ -102,12 +102,13 @@ func NewResourceServer(opts ServerOptions) (resource.ResourceServer, error) {
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,
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.
})
if err != nil {
return nil, err