Skip to content

Commit 7dd7285

Browse files
jmikolaajdavis
authored andcommitted
CDRIVER-2057: localThresholdMS should default to 15 milliseconds
1 parent 198901c commit 7dd7285

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/mongoc/mongoc-topology-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define MONGOC_TOPOLOGY_MIN_HEARTBEAT_FREQUENCY_MS 500
2828
#define MONGOC_TOPOLOGY_SOCKET_CHECK_INTERVAL_MS 5000
2929
#define MONGOC_TOPOLOGY_COOLDOWN_MS 5000
30-
#define MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS 15000
30+
#define MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS 15
3131
#define MONGOC_TOPOLOGY_SERVER_SELECTION_TIMEOUT_MS 30000
3232
#define MONGOC_TOPOLOGY_HEARTBEAT_FREQUENCY_MS_MULTI_THREADED 10000
3333
#define MONGOC_TOPOLOGY_HEARTBEAT_FREQUENCY_MS_SINGLE_THREADED 60000

tests/json-test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,8 @@ test_server_selection_logic_cb (bson_t *test)
454454

455455
/* TODO: use topology_select instead? */
456456
mongoc_topology_description_suitable_servers (
457-
&selected_servers, op, &topology, read_prefs, 15);
457+
&selected_servers, op, &topology, read_prefs,
458+
MONGOC_TOPOLOGY_LOCAL_THRESHOLD_MS);
458459

459460
/* check each server in expected_servers is in selected_servers */
460461
memset (matched_servers, 0, sizeof (matched_servers));

0 commit comments

Comments
 (0)