Skip to content

Commit 7ae91d3

Browse files
REALMC-8848: upgrade to latest go driver release (#4)
* REALMC-5872 merging topology changes to v1.4.1 driver (#1) * Update version to v1.3.1+prerelease * Change w value for unsatisfiable write concern in tests (mongodb#301) - Addresses test failures that started after by SERVER-45920 * GODRIVER-895 check if strLength is 0 in ReadCodeWithScope (mongodb#311) * GODRIVER-1487 fix adding UnknownTransactionCommitResult (mongodb#307) * GODRIVER-1488 turn off DecodeDeepZeroInline for mgocompat.Registry (mongodb#312) * Fix primitive.Regex Equal method (mongodb#318) * GODRIVER-1507 Correctly pass URI to topology (mongodb#320) * Update version to 1.3.1 * Update version to v1.3.2+prerelease * GODRIVER-1522 Ignore read preference for aggregations with output stages (mongodb#327) * GODRIVER-1520 Fix panics for lone scope (mongodb#331) * GODRIVER-1532 Remove check when decoding invalid UTF-8 strings (mongodb#333) * Fix typo in objectid.go (mongodb#335) * GODRIVER-1502 Fix variable shadowing in parsing (mongodb#332) * GODRIVER-1506 Fix error checking for invalid extjson timestamp values (mongodb#337) * GODRIVER-1504 Restrict top-level keys from being parsed as extjson (mongodb#340) * GODRIVER-1513 Disallow escaped single quotes in extjson keys (mongodb#342) * GODRIVER-1535 Fix session IDs batching in Disconnect * GODRIVER-1540 fix deadlock in connection (mongodb#348) * GODRIVER-1549 Select all servers when an empty tag set is given (mongodb#352) * GODRIVER-1431 Add explicit encryption examples (mongodb#350) * Update version to v1.3.2 * STITCH-4296: Export contextWithSession * STITCH-4296: Export sessionFromContext * STITCH-4680 - expose topology consistency * STITCH-4841: Add FullDocumentBeforeChange option to Mongo-go-driver * GODRIVER-672 Change session IDs to be stored as bson.Raw (mongodb#339) (cherry picked from commit d080bd0) * do not leak cancelConnectContext * REALMC-5872 renaming NewSessionContext to ContextWithSession * REALMC-5872 adding back size check in pool test * REALMC-5872 removing unused IsConsistent topology function and renaming changed vars Co-authored-by: Divjot Arora <[email protected]> Co-authored-by: iwysiu <[email protected]> Co-authored-by: mengskysama <[email protected]> Co-authored-by: Luca(Wei) Chen <[email protected]> Co-authored-by: Haley Owen <[email protected]> Co-authored-by: Eric Daniels <[email protected]> Co-authored-by: Tyler Kaye <[email protected]> Co-authored-by: Jonathan Reams <[email protected]> Co-authored-by: mike o'brien <[email protected]> (cherry picked from commit c59bda0) * REALMC-6991: add topology check Co-authored-by: Kush Patel <[email protected]>
1 parent df759a4 commit 7ae91d3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mongo/client.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,3 +943,13 @@ func (c *Client) createBaseCursorOptions() driver.CursorOptions {
943943
Crypt: c.cryptFLE,
944944
}
945945
}
946+
947+
// IsTopologyConsistent returns false when we have a replica set that claims to
948+
// have no primary but there exists a primary with all other nodes as secondaries. This
949+
// specifically works around HELP-13825.
950+
func (c *Client) IsTopologyConsistent() bool {
951+
if topo, ok := c.deployment.(*topology.Topology); ok {
952+
return topo.IsConsistent()
953+
}
954+
return true
955+
}

0 commit comments

Comments
 (0)