File tree Expand file tree Collapse file tree 4 files changed +43
-2
lines changed
tests/json/server_selection/server_selection/ReplicaSetNoPrimary/read Expand file tree Collapse file tree 4 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ New features and bug fixes:
37
37
* Added support for the new readConcernLevel "linearizable".
38
38
* New CMake option ENABLE_TRACING allows debug output, which before had only
39
39
been available with "configure --enable-tracing".
40
+ * Bugfix: "PossiblePrimary"-type replicas could be selected for reads
40
41
41
42
Removed configure flags:
42
43
* --enable-experimental has been removed and all of its features
Original file line number Diff line number Diff line change @@ -290,7 +290,6 @@ _mongoc_topology_description_server_is_candidate (
290
290
switch ((int )read_mode ) {
291
291
case MONGOC_READ_PRIMARY :
292
292
switch ((int )desc_type ) {
293
- case MONGOC_SERVER_POSSIBLE_PRIMARY :
294
293
case MONGOC_SERVER_RS_PRIMARY :
295
294
return true;
296
295
default :
@@ -305,7 +304,6 @@ _mongoc_topology_description_server_is_candidate (
305
304
}
306
305
default :
307
306
switch ((int )desc_type ) {
308
- case MONGOC_SERVER_POSSIBLE_PRIMARY :
309
307
case MONGOC_SERVER_RS_PRIMARY :
310
308
case MONGOC_SERVER_RS_SECONDARY :
311
309
return true;
Original file line number Diff line number Diff line change
1
+ {
2
+ "in_latency_window" : [],
3
+ "operation" : " read" ,
4
+ "read_preference" : {
5
+ "mode" : " Primary" ,
6
+ "tag_sets" : [
7
+ {}
8
+ ]
9
+ },
10
+ "suitable_servers" : [],
11
+ "topology_description" : {
12
+ "servers" : [
13
+ {
14
+ "address" : " b:27017" ,
15
+ "avg_rtt_ms" : 5 ,
16
+ "type" : " PossiblePrimary"
17
+ }
18
+ ],
19
+ "type" : " ReplicaSetNoPrimary"
20
+ }
21
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "in_latency_window" : [],
3
+ "operation" : " read" ,
4
+ "read_preference" : {
5
+ "mode" : " Nearest" ,
6
+ "tag_sets" : [
7
+ {}
8
+ ]
9
+ },
10
+ "suitable_servers" : [],
11
+ "topology_description" : {
12
+ "servers" : [
13
+ {
14
+ "address" : " b:27017" ,
15
+ "avg_rtt_ms" : 5 ,
16
+ "type" : " PossiblePrimary"
17
+ }
18
+ ],
19
+ "type" : " ReplicaSetNoPrimary"
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments