- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.3k
Description
Is your feature request related to a problem? Please describe
Background:
Currently, the File Cache implementation includes a circuit breaker check in both the Put and Compute operations. Before adding any entry to the file cache, the system checks if the parent circuit breaker (which monitors total memory usage) has been tripped.
Problem:
This circuit breaker check was originally added as a preventative measure to limit the maximum number of entries in the file cache. However, as noted in issue #6227, file cache entries consume minimal memory and their impact on overall memory usage is not significant.
Describe the solution you'd like
Solution:
Provide a no-operation (Noop) circuit breaker specifically for file cache operations in the constructor.
Pros:
- Minimal code changes required
- Maintains existing interface contracts
- No performance overhead from circuit breaker checks
Cons:
- Could be confusing for future developers
Rationale:
- File cache entries have negligible memory footprint, making the current circuit breaker check ineffective for its intended purpose
- Dedicated file cache guardrails (PR Addition of fileCache activeUsage evaluator to DiskThresholdMonitor #19071) provide better control mechanisms
- In high JVM memory situations, admission control and search back pressure mechanisms should already be rejecting requests upstream, making this additional check redundant
This change simplifies the file cache logic while maintaining appropriate safeguards through more targeted mechanisms.
Related component
Search:Searchable Snapshots
Describe alternatives you've considered
Alternate Approaches
Remove Circuit Breaker from the File Cache Interface entirely.
Pros:
- More cleaner solution
Cons:
- Requires lot more changes in multiple files
- Will need to introduce additional constructor and keep the existing constructor as well as it is part of public api.
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status