-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[ENH]: Adding close() method to clients #1792
[ENH]: Adding close() method to clients #1792
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the use-case here. Why would someone want to shut down their system without just destroying the object?
@beggers, there are two issues that users have reported:
While |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main concern here is that this puts Clients and Servers into a weird and inconsistent state where they can't do anything. Could we instead call this close_connections()
and have it kill open network connections?
For HTTP/Cloud clients, that makes sense; the intent is clear. What are your thoughts about PersistentClient? |
PersistentClient doesn't make any network connections IIUC. So it should be a no-op and probably raise an error explaining. |
Actually, the issue with PersistentClient (see above) is that it keeps open files - the SQLite3 db (at least one handle), 4 handles for each open index. The problem for some apps is that they rely on being able to clean up resources e.g. open files. One challenge I see with implementing |
This makes sense to me, whats the UX for
|
25f52b1
to
55b73a9
Compare
2173199
to
0e35813
Compare
…e persistent clients.
@tazarov when this PR is expected to be merged, is anything left in this PR? |
Closing in favor of #2581 |
@tazarov i think you linked the wrong issue here? |
@jeffchuber, updated to #2581 |
Refs: #1756, Also (https://discord.com/channels/1073293645303795742/1209706648243929128)
Description of changes
Summarize the changes made by this PR.
Test plan
How are these changes tested?
pytest
for pythonDocumentation Changes
TBD