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

[BUG] OpenSearch should clean up temporary files created during segment merge incase segment merge fails #5710

Closed
RS146BIJAY opened this issue Jan 5, 2023 · 6 comments
Assignees
Labels
bug Something isn't working distributed framework

Comments

@RS146BIJAY
Copy link
Contributor

RS146BIJAY commented Jan 5, 2023

Describe the bug
Currently, during segment merge (both during auto merge and force merge), OpenSearch creates multiple temporary files while merging individual segment components. Once individual components of the segments are merged, IndexWriter creates a Compound file (*.cfs) containing all the Lucene components for a segment. At the end, OpenSearch deletes these temporary files.

Now, in case these temporary files consume all the space on the node (because enough amount of space is unavailable for segment merge to go through), segment merge will fail. Also, the files which got created during segment merge do not get cleaned up and it continues to occupy space on the node. This can cause FSHealthService checks to fail for this node, ultimately causing these nodes to be removed from cluster.

Expected behavior
In case Force segment merge fails, OpenSearch should remove the temporary files created during segment merge.

@RS146BIJAY RS146BIJAY added bug Something isn't working untriaged labels Jan 5, 2023
@RS146BIJAY RS146BIJAY changed the title OpenSearch should clean up temporary files created during segment merge incase segment merge fails [BUG]OpenSearch should clean up temporary files created during segment merge incase segment merge fails Jan 5, 2023
@RS146BIJAY RS146BIJAY changed the title [BUG]OpenSearch should clean up temporary files created during segment merge incase segment merge fails [BUG] OpenSearch should clean up temporary files created during segment merge incase segment merge fails Jan 5, 2023
@anasalkouz
Copy link
Member

Hi @RS146BIJAY, this Seems to be an important bug, are you actively working on it?

@RS146BIJAY
Copy link
Contributor Author

@anasalkouz Yes we are actively working on all this issue (all included under the parent META issue)

@anasalkouz
Copy link
Member

@RS146BIJAY Any plan to fix again?

@RS146BIJAY
Copy link
Contributor Author

Yeah. We are analysing where this fix should go in. We started observing few race condtion scenario with above change therefore had to revert the change. Will send the fix for this issue in few weeks time.

@RS146BIJAY
Copy link
Contributor Author

Created a github issue in Lucene as this issue seems to be introduced in this Lucene commit.

@RS146BIJAY
Copy link
Contributor Author

Created a RFC document listing possible approaches to gain feedback: #8024

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

No branches or pull requests

3 participants