Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,384 changes: 0 additions & 2,384 deletions .evergreen/config.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .evergreen/krb5.config

This file was deleted.

3 changes: 0 additions & 3 deletions .evergreen/ocsp-requirements.txt

This file was deleted.

22 changes: 0 additions & 22 deletions .evergreen/run-mongodb-aws-ecs-test.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .evergreen/run-task.sh

This file was deleted.

94 changes: 0 additions & 94 deletions .evergreen/setup-system.sh

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/create-release-branch.yml

This file was deleted.

11 changes: 11 additions & 0 deletions mongod-test.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
systemLog:
destination: file
path: /tmp/mongod-test.log
logAppend: true
storage:
dbPath: /tmp/mongodb-test
net:
bindIp: 127.0.0.1
port: 27017
security:
authorization: disabled
12 changes: 10 additions & 2 deletions x/mongo/driver/topology/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,22 @@ func (t *Topology) selectServerFromSubscription(
subscriptionCh <-chan description.Topology,
srvSelector description.ServerSelector,
) ([]description.Server, error) {

current := t.Description()
serverCfg := newServerConfig(t.cfg.ConnectTimeout, t.cfg.ServerOpts...)
interval := serverCfg.heartbeatInterval
if interval <= 0 {
interval = 10 * time.Second
}
ticker := time.NewTicker(interval)
defer ticker.Stop()
for {
select {
case <-ctx.Done():
return nil, ServerSelectionError{Wrapped: ctx.Err(), Desc: current}
case current = <-subscriptionCh:
default:
case <-ticker.C:
t.RequestImmediateCheck()
current = t.Description()
}

suitable, err := t.selectServerFromDescription(current, srvSelector)
Expand Down