elastic / elastic/beats

Filestream bases `clean_inactive` on process start time, not file update time

Open
#45,600 3 comments 1 reaction 0 assignees View on GitHub
bug Team:Elastic-Agent-Data-Plane
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 54m
Merged PRs (30d)
381

Description

Filestream's `clean_inactive` parameter is supposed to clean up old registry entries when the file is too old to ingest, and unchanged for the specified time interval. However, rather than using the file's actual update time, it uses either the file's update time or Filebeat's startup timestamp, whichever is later.

This means that for example, if Filestream is configured to clean up registry entries after 14 days, it will never clean them up unless Filebeat itself runs continuously for 14 days with no restarts.

Contributor guide

Open the contributing guide

Research direction

Start by tracing Filestream's clean_inactive handling and identify where the file update time and Filebeat startup timestamp are compared. Verify the cleanup decision against the file's actual update time, and confirm the behavior with a regression test covering restarts and the configured inactivity interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.