[CDRIVER-594] Make all of the timeouts and intervals in SS/SDAM work correctly Created: 27/Mar/15  Updated: 08/Jan/24  Resolved: 07/Apr/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2-beta0

Type: Bug Priority: Major - P3
Reporter: Mira Carey Assignee: Mira Carey
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-610 Client should retry every .5 sec unti... Closed
related to CDRIVER-585 Change minHeartbeatFrequencyMS from 1... Closed

 Description   

Nothing was really right (cond_timedwait was a bad implementation, a bunch of the timeouts were using microseconds and milliseconds interchangably, etc. etc)

We didn't let you set any of the configurable parameters, etc, etc.

Fix it all



 Comments   
Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #218 from ajdavis/timeout-fix

CDRIVER-594 Fix timeout in single-thread selection
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/fa3d7920242c2d510976d0c51c1120178432b72c

Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-594 Fix timeout in single-thread selection

Cancel after first blocking scan's timeout, not the second's.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/22c26f0d0ec720d3e20cedc1f7a8168e92ceaf47

Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #213 from hanumantmk/CDRIVER-594

CDRIVER-594 fix all the SS/SDAM timers
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/181884caef9a2ff39b1d8f76aaf2d10f623b04e2

Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #213 from hanumantmk/CDRIVER-594

CDRIVER-594 fix all the SS/SDAM timers
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/181884caef9a2ff39b1d8f76aaf2d10f623b04e2

Comment by Githook User [ 07/Oct/15 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey (hanumantmk)', u'email': u'jcarey@argv.me'}

Message: CDRIVER-594 fix all the SS/SDAM timers
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0b592d7ba4498ee7c2a3a5a07a50399194fa6d0d

Comment by Githook User [ 11/Apr/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #218 from ajdavis/timeout-fix

CDRIVER-594 Fix timeout in single-thread selection
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/fa3d7920242c2d510976d0c51c1120178432b72c

Comment by Githook User [ 11/Apr/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-594 Fix timeout in single-thread selection

Cancel after first blocking scan's timeout, not the second's.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/22c26f0d0ec720d3e20cedc1f7a8168e92ceaf47

Comment by Hannes Magnusson [ 08/Apr/15 ]

mira.carey@mongodb.com before the latest commit to CDRIVER-610:

grep -c 'ENTRY: mongoc_topology_description_select' debug.txt
397802

after:

grep -c 'ENTRY: mongoc_topology_description_select' debug.txt
384466

both cases, 99.9% of cpu the entire time

– EDIT: Whops, debug.txt was appended to – updated the grep count

Comment by Mira Carey [ 08/Apr/15 ]

bjori, is it actually an endless loop, or just three long retires?

A fix via CDRIVER-610, should have cleaned things up if it was the later

Comment by Hannes Magnusson [ 07/Apr/15 ]

It looks like this commit broke something.

When I attempt to connect to a non-existing-node I wind up in an endless loop

[2015-04-07T22:49:09+00:00]     PHONGO: DEBUG   > Connecting to 'mongodb://:@/tmp/mongodb-27018.sock:27017/?ssl=0&authMechanism=&authSource=admin'
[2015-04-07T22:49:09+00:00]     PHONGO: TRACE   >  EXIT: phongo_stream_initiator():965
[2015-04-07T22:49:09+00:00]     mongoc: TRACE   > ENTRY: mongoc_topology_description_select():439
[2015-04-07T22:49:09+00:00]     mongoc: TRACE   >  EXIT: mongoc_topology_description_select():468
[2015-04-07T22:49:09+00:00]     PHONGO: TRACE   > ENTRY: phongo_stream_initiator():910
[2015-04-07T22:49:09+00:00]     PHONGO: DEBUG   > Connecting to 'mongodb://:@/tmp/mongodb-27018.sock:27017/?ssl=0&authMechanism=&authSource=admin'
[2015-04-07T22:49:09+00:00]     PHONGO: TRACE   >  EXIT: phongo_stream_initiator():965
[2015-04-07T22:49:09+00:00]     mongoc: TRACE   > ENTRY: mongoc_topology_description_select():439
[2015-04-07T22:49:09+00:00]     mongoc: TRACE   >  EXIT: mongoc_topology_description_select():468
[2015-04-07T22:49:09+00:00]     PHONGO: TRACE   > ENTRY: phongo_stream_initiator():910

And when SSL (hostname) verification fails:

[2015-04-07T23:10:11+00:00]     PHONGO: DEBUG   > Enabling SSL
[2015-04-07T23:10:11+00:00]     mongoc: TRACE   > ENTRY: mongoc_topology_description_select():439
[2015-04-07T23:10:11+00:00]     mongoc: TRACE   >  EXIT: mongoc_topology_description_select():453
[2015-04-07T23:10:11+00:00]     PHONGO: TRACE   > ENTRY: phongo_stream_initiator():910
[2015-04-07T23:10:11+00:00]     PHONGO: DEBUG   > Connecting to 'mongodb://:@192.168.112.10:2100/?ssl=1&authMechanism=&authSource='
[2015-04-07T23:10:11+00:00]     PHONGO: DEBUG   > Created: RSRC#418 as 'mongodb://:@192.168.112.10:2100/?ssl=1&authMechanism=&authSource='
[2015-04-07T23:10:11+00:00]     PHONGO: DEBUG   > Enabling SSL
[2015-04-07T23:10:11+00:00]     mongoc: TRACE   > ENTRY: mongoc_topology_description_select():439
[2015-04-07T23:10:11+00:00]     mongoc: TRACE   >  EXIT: mongoc_topology_description_select():453
[2015-04-07T23:10:11+00:00]     PHONGO: TRACE   > ENTRY: phongo_stream_initiator():910
[2015-04-07T23:10:11+00:00]     PHONGO: DEBUG   > Connecting to 'mongodb://:@192.168.112.10:2100/?ssl=1&authMechanism=&authSource='
[2015-04-07T23:10:11+00:00]     PHONGO: DEBUG   > Created: RSRC#422 as 'mongodb://:@192.168.112.10:2100/?ssl=1&authMechanism=&authSource='
[2015-04-07T23:10:11+00:00]     PHONGO: DEBUG   > Enabling SSL

Where the phongo_stream_initiator() returns NULL every single time.

Note that thing that looks like a connection uri in the log – it is not – so take the options with grain of salt

Comment by Githook User [ 07/Apr/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #213 from hanumantmk/CDRIVER-594

CDRIVER-594 fix all the SS/SDAM timers
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/181884caef9a2ff39b1d8f76aaf2d10f623b04e2

Comment by Githook User [ 07/Apr/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #213 from hanumantmk/CDRIVER-594

CDRIVER-594 fix all the SS/SDAM timers
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/181884caef9a2ff39b1d8f76aaf2d10f623b04e2

Comment by Githook User [ 07/Apr/15 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey (hanumantmk)', u'email': u'jcarey@argv.me'}

Message: CDRIVER-594 fix all the SS/SDAM timers
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/0b592d7ba4498ee7c2a3a5a07a50399194fa6d0d

Generated at Wed Feb 07 21:10:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.