Skip to content

use selectors instead of select.select() #3899

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

Merged
merged 1 commit into from
May 29, 2020

Conversation

skshetry
Copy link
Collaborator

@skshetry skshetry commented May 28, 2020

I noticed that we were going >1024 on file descriptors. And, as select() does not work with >1024 file descriptors, using poll might fix the problem.

Though, it does not support Windows. So, I have used a higher level API selectors that will use whatever is most efficient for the current platform. Though, due to lack of *poll() in Windows, it will use select there.

Closes #3888

@skshetry skshetry changed the title try using poll() in ssh [TEST PR] [DO NOT MERGE] try using poll() in ssh May 28, 2020
@efiop
Copy link
Contributor

efiop commented May 28, 2020

@skshetry Unfortunately we won't see if this fixed it until we merge 🙂 Your sollution looks very good, let's fallback to select on windows and merge 🙂

@skshetry skshetry force-pushed the try-fixing-flakey-tests branch from 8da6357 to c16851d Compare May 29, 2020 02:59
@skshetry skshetry changed the title [TEST PR] [DO NOT MERGE] try using poll() in ssh use selectors instead of select.select() May 29, 2020
@skshetry skshetry requested review from efiop, pmrowla and pared May 29, 2020 03:03
@skshetry skshetry self-assigned this May 29, 2020
@@ -237,11 +237,15 @@ def execute(self, cmd):
or channel.recv_ready()
or channel.recv_stderr_ready()
):
import select
import selectors
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoa, didn't know about this one! Neat!

@skshetry skshetry merged commit bb50fb8 into iterative:master May 29, 2020
@skshetry skshetry deleted the try-fixing-flakey-tests branch May 29, 2020 03:40
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.

tests: flaky ssh tests
3 participants