[SERVER-9927] WSAPoll not defined on windows server 2003 64 Created: 13/Jun/13  Updated: 11/Jul/16  Resolved: 10/Oct/13

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 2.5.0
Fix Version/s: 2.5.3

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: Windows
Participants:

 Description   

Since server2003 is now our default win64 platform, our checks for WSAPoll break in sock.cpp. Need to dynamically link in WSAPoll on Windows platforms if it exists.



 Comments   
Comment by Mathias Stearn [ 10/Oct/13 ]

Two commits meant to be on this ticket:

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-9929 Pull in WSAPoll from dll on windows

It is only available in Vista+

This commit also reverts f3ebed0f3ab8e1cf0df752fb9e44875ed1e3849d to reenable
jstests/sharding/shard_kill_and_pooling.js
Branch: master
https://github.com/mongodb/mongo/commit/3b33315ab3dedf8314eb3da126dd0fc56555deb9

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-9929 Add socket_poll.cpp to libmongoclient
Branch: master
https://github.com/mongodb/mongo/commit/bf312205b5e5c9f6bdf1d0968c3fe601430f8a38

Comment by auto [ 28/Jun/13 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-9927 change of default win platform breaks WSAPoll
Branch: master
https://github.com/mongodb/mongo/commit/f3ebed0f3ab8e1cf0df752fb9e44875ed1e3849d

Comment by Eric Milkie [ 13/Jun/13 ]

It's pretty new :/ sorry!

Comment by Andrew Morrow (Inactive) [ 13/Jun/13 ]

OK, I think that is starting to make sense. So this test never would have passed on XP to begin with. Thats a bit odd, as I'm fairly sure I ran the test suite when I was re-enabling XP support. Or is the test maybe newer than that?

Comment by Eric Milkie [ 13/Jun/13 ]

I see your confusion now.
The code in sock.cpp simply skips the features provided by the code block that calls WSAPoll(). The unit test that broke was depending on the functionality of the code. We decided to simply not have this functionality on older versions of Windows, rather than spend time implementing it.
You may be confusing this section of code with the one I wrote to reimplement select() on Windows, where I considered using WSAPoll and then didn't, because of this versioning issue. The two sections of code are different.

Comment by Andrew Morrow (Inactive) [ 13/Jun/13 ]

I was asking about current behavior. I'm a bit puzzled how lowering the minimum to server 2003 could have broken things, since we already had code in place to deal with the lack of WSAPoll on pre-vista platforms, which we needed for XP support.

Comment by Eric Milkie [ 13/Jun/13 ]

Are you asking what the current behavior of the code should be, or are you suggesting what we ought to change the code to do?

Currently, because we are now targetting Windows Server 2003 instead of Vista, that modified the Winsock2 header such that it obscured the WSAPoll function, so none of our Windows builds will make use of our code in that block that uses WSAPoll. We'll need to dynamically detect that function like we already are for QueryWorkingSetEx().

Comment by Andrew Morrow (Inactive) [ 13/Jun/13 ]

Shouldn't this just fall through to the XP support if Vista support is not detected?

Comment by auto [ 13/Jun/13 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-9927 change of default win platform breaks WSAPoll
Branch: master
https://github.com/mongodb/mongo/commit/77c838a35f2a1475b859ed869d9e018dc233e4c6

Generated at Thu Feb 08 03:21:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.