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 "Too many open files" during rebalancing #83

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

borzunov
Copy link
Collaborator

@borzunov borzunov commented Nov 1, 2022

Now, the number of open files stays the same after every rebalancing.

@@ -89,10 +91,14 @@ def start(self):
self._prioritizer_thread.start()
super().start()

def shutdown(self, timeout: Optional[float] = None):
self.submitted_tasks.put(None)
self.terminate()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terminating the process here the hard way leaves open files. I replaced it with a graceful termination.

@borzunov borzunov merged commit 87fd6a4 into main Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant