Replace select(2) with poll(2) for connection management. #34

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
@vovkasm

vovkasm commented Jun 19, 2012

select(2) can't monitor fds with number >1024. This is troublesome for
network servers with many connections. After reconnects MongoDB's fd has
number >1024 and select returns with error.

Replace select(2) with poll(2) to monitor file descriptors.
select(2) can't monitor fds with number >1024. This is troublesome for
network servers with many connections. After reconnects MongoDB's fd has
number >1024 and select returns with error.
@kchodorow

This comment has been minimized.

Show comment
Hide comment
@kchodorow

kchodorow Jun 19, 2012

Contributor

This would be great, but it looks like Windows uses WSAPoll instead of poll(). So, I'm going to wait on merging it until I have time to implement the Windows version alongside the posix one (or if you have a Windows machine handy and want to help further...).

Contributor

kchodorow commented Jun 19, 2012

This would be great, but it looks like Windows uses WSAPoll instead of poll(). So, I'm going to wait on merging it until I have time to implement the Windows version alongside the posix one (or if you have a Windows machine handy and want to help further...).

@vovkasm

This comment has been minimized.

Show comment
Hide comment
@vovkasm

vovkasm Jun 20, 2012

Ops... windowzzz... I'll try to fix this...

vovkasm commented Jun 20, 2012

Ops... windowzzz... I'll try to fix this...

vovkasm added some commits Jul 8, 2012

strerror not implemented on WIN32. MSDN suggests to use FormatMessage…
…, but I can not test it, so simple print "-" instead of readable message
@vovkasm

This comment has been minimized.

Show comment
Hide comment
@vovkasm

vovkasm Jul 8, 2012

Please test!
I only have WinXP. And no MSVC. So I can't test.

vovkasm commented Jul 8, 2012

Please test!
I only have WinXP. And no MSVC. So I can't test.

@kchodorow

This comment has been minimized.

Show comment
Hide comment
@kchodorow

kchodorow Jul 11, 2012

Contributor

I'll merge as soon as I get a chance to test on Windows...

Contributor

kchodorow commented Jul 11, 2012

I'll merge as soon as I get a chance to test on Windows...

@edaniels

This comment has been minimized.

Show comment
Hide comment
@edaniels

edaniels Jul 23, 2014

Member

Closing this as our networking code is undergoing an overhaul very soon. Sorry to keep you wiring @vovkasm

Member

edaniels commented Jul 23, 2014

Closing this as our networking code is undergoing an overhaul very soon. Sorry to keep you wiring @vovkasm

@edaniels edaniels closed this Jul 23, 2014

@vovkasm

This comment has been minimized.

Show comment
Hide comment
@vovkasm

vovkasm Jul 23, 2014

No problems. We worked with locally patched version of module about 3-4 months, but at the end we realized that MongoDB big crap at all (for our workload). After that we switched to mysql with simple MyISAM table that maps object ids to serialized data and now we a happy with this scheme. ;-)

vovkasm commented Jul 23, 2014

No problems. We worked with locally patched version of module about 3-4 months, but at the end we realized that MongoDB big crap at all (for our workload). After that we switched to mysql with simple MyISAM table that maps object ids to serialized data and now we a happy with this scheme. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment