[CDRIVER-699] Fail-fast server selection mode Created: 08/Jun/15  Updated: 19/Oct/16  Resolved: 18/Aug/15

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.2.0
Fix Version/s: 1.2-beta1

Type: New Feature Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CDRIVER-679 mongoc_client_kill_cursor triggers Se... Closed
is depended on by CDRIVER-438 Implement Server Discovery And Monito... Closed
Related
is related to PHPC-252 Application freezes for a minute when... Closed

 Comments   
Comment by Githook User [ 11/Jan/16 ]

Author:

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

Message: CDRIVER-699 don't depend on precise clock

On Windows, at least, the clock resolution is milliseconds, which is not always
fine enough to know that a blocking scan has been tried once since the
selection loop began.
Branch: 1.3.0-dev
https://github.com/mongodb/mongo-c-driver/commit/d3ec435fa508edcde2096056035aaf275aeed6a9

Comment by Githook User [ 03/Sep/15 ]

Author:

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

Message: CDRIVER-699 don't depend on precise clock

On Windows, at least, the clock resolution is milliseconds, which is not always
fine enough to know that a blocking scan has been tried once since the
selection loop began.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/d3ec435fa508edcde2096056035aaf275aeed6a9

Comment by Githook User [ 20/Aug/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: Merge branch '1.2.0-dev' of github.com:mongodb/mongo-c-driver into CDRIVER-756-network-failures

Comment by Githook User [ 18/Aug/15 ]

Author:

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

Message: CDRIVER-699 always scan once before selection err

Update single-threaded mongoc_topology_select to match this change:

https://github.com/mongodb/specifications/commit/8a1189

Also, abort selection early if try-once is false and there is no time left for
the required half-second sleep.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/13a61fd09b3f665956db34f325183c9359b396de

Comment by Githook User [ 18/Aug/15 ]

Author:

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

Message: CDRIVER-699 thoroughly describe timeout options

Comply with Server Selection Spec's requirements for driver docs.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/c5fa33e74bcab81e0bd50320fa863254a19f4dfb

Comment by Githook User [ 10/Aug/15 ]

Author:

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

Message: CDRIVER-699 let test_topology_reconcile_rs pass for now
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/e02892f5dc436d747ab6759a61e989254d3b9f76

Comment by A. Jesse Jiryu Davis [ 10/Aug/15 ]

Update implementation and tests for the latest change to server selection, "really try once" and timeout interaction issues: https://github.com/mongodb/specifications/commit/8a118950

Comment by Githook User [ 07/Aug/15 ]

Author:

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

Message: CDRIVER-699 implement serverSelectionTryOnce

Server Selection Spec:

Single-threaded drivers MUST provide a "serverSelectionTryOnce" mode, in
which the driver scans the topology exactly once after server selection
fails, then either selects a server or raises an error.

The serverSelectionTryOnce option MUST be true by default. If it is set
false, then the driver repeatedly searches for an appropriate server for
up to serverSelectionTimeoutMS milliseconds (pausing
minHeartbeatFrequencyMS between attempts).
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/d15b0e43372976d7d95ebe07e575ced14b4056e9

Comment by Githook User [ 07/Aug/15 ]

Author:

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

Message: CDRIVER-699 introduce serverSelectionTryOnce option
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/9e280c85e127a1672dc20dfa783883978bfe02c2

Comment by Githook User [ 05/Aug/15 ]

Author:

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

Message: CDRIVER-699 longer sleep in cooldown tests
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/109a3ca5507db35c45403b9744e2205b19acf4ca

Comment by Githook User [ 05/Aug/15 ]

Author:

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

Message: CDRIVER-699 scanner thread ignores cooldown correctly

Bugfix to unreleased code: The scanner's logic was inverted. It was
supposed to ignore cooldownMS and always recheck down nodes. Instead,
it never rechecked them.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/2f6d3bed85b7e2874663e02c76b6c17f972bc519

Comment by Githook User [ 05/Aug/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: Revert "Revert "CDRIVER-699 obey cooldownTimeMS""

This reverts commit ca5c8f90003754bf2b880b695372ac630fe30dcf.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/a6c3fb524f66b87b948390d1445a7058545c207c

Comment by Githook User [ 05/Aug/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: Revert "CDRIVER-699 obey cooldownTimeMS"

This reverts commit 922b3f6fb8db7f2627b89d637d11d8887ae1d104.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/ca5c8f90003754bf2b880b695372ac630fe30dcf

Comment by A. Jesse Jiryu Davis [ 21/Jul/15 ]

"cooldownMS" now implemented. Next phase is "serverSelectionTryOnce".

Comment by Githook User [ 21/Jul/15 ]

Author:

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

Message: CDRIVER-699 obey cooldownTimeMS

Server Description And Monitoring Spec change: "After a single-threaded client
gets a network error trying to check a server, the client skips re-checking the
server until cooldownMS has passed."

Additional timing fixes in topology: don't quit with a timeout until after
checking if a suitable server was discovered, and don't sleep
minHeartbeatFrequencyMS unless needed.
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/922b3f6fb8db7f2627b89d637d11d8887ae1d104

Comment by Githook User [ 17/Jun/15 ]

Author:

{u'username': u'derickr', u'name': u'Derick Rethans', u'email': u'github@derickrethans.nl'}

Message: Workaround until SPEC-217 and CDRIVER-699 are fully implemented
Branch: master
https://github.com/10gen-labs/mongo-hhvm-driver-prototype/commit/4fb6075fb79462b836ba5aa18945769ecc55a612

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