Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-zero reference count for replica shard files in CompositeDirectory #17534

Open
skumawat2025 opened this issue Mar 6, 2025 · 0 comments
Labels
bug Something isn't working _No response_ untriaged

Comments

@skumawat2025
Copy link
Contributor

Describe the bug

When a new file is created in CompositeDirectory, its reference count is increased by 1 in the FileCache. This count is normally decreased when the file is uploaded to remote storage. However, for replica shards, a segment_n file is created but never uploaded, leaving its reference count at 1. This causes problems during index deletion, as some files can't be deleted due to non-zero references.

We need to evaluate two options:

  • Prevent file creation on replica shards for CompositeDirectory.
  • If files must be created on replica shards, ensure they don't have non-zero references in the FileCache.
    This issue affects clean index deletion and may lead to resource leaks if not addressed.

Meta Issue: #13149

Related component

No response

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

.

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working _No response_ untriaged
Projects
None yet
Development

No branches or pull requests

1 participant