Fix TTL Behavior for Directories in Path-Specific Configuration #6827
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem are we solving?
Currently, when configuring TTL for a specific path prefix using
fs.configure
, the TTL is incorrectly applied to both files and directories. This leads to directories being deleted prematurely before their contained files expire, making valid files inaccessible through the filesystem interface. This issue affects scenarios where path-specific TTLs are used to manage file lifecycles, particularly in log management and temporary file storage systems.Reference: Issue #6820
How are we solving the problem?
CreateEntry
function to set TTL of directories to zeroHow is the PR tested?
Checks
Additional Notes
This fix ensures that directories remain accessible as long as they contain valid files, improving the reliability of TTL-based file management systems. The change is particularly important for applications that rely on path-specific TTL configurations for log rotation and temporary file management.
Commit: b8f2eb9