A better way to avoid deadlocks and not sacrifice performance on _getfiles
call.
Details
- Reviewers
durham - Group Reviewers
Restricted Project - Commits
- rFBHGXbdfae9b06013: remotefilelog: implement threaded _getfiles
- build, pull and update on Windows
- build, pull and update on Linux
- do not observe it hanging
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
remotefilelog/fileserverclient.py | ||
---|---|---|
263 | We probably want twriterthread.daemon = True, that way if the main thread throws an exception, this thread doesn't keep the process alive forever. | |
269 | If the background thread throws an exception for some reason, this receivemissing could be stuck forever right? Since we're trying to read the response to a request that was never sent. I think that's one of the big problems the 26bca55ffbc solution was trying to solve. |
remotefilelog/fileserverclient.py | ||
---|---|---|
396 | Given that this approach caused deadlocks almost immediately last time we tried it, maybe we do non-threading by default for now, and turn it on for our team and windows users for a while before we ship it more broadly. |
We should fix the exception handling before rolling to Linux, since there's definitely infinite hang potential
We probably want twriterthread.daemon = True, that way if the main thread throws an exception, this thread doesn't keep the process alive forever.