[GODRIVER-2054] selectServerFromSubscription hangs Created: 19/Jun/21  Updated: 22/Jun/21  Resolved: 22/Jun/21

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Unknown
Reporter: Guowei Shieh Assignee: Kevin Albertson
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hi, We're using mongo-driver 1.4.6 (golang) to talk to microsoft cosmos db (SDK version 3.6). However, recently, we experience issues. The program starts with everything fine, but after a while, it seems that somehow the program gets into a stack that all mongo request just timed out after 30 second. Here is the call stack. 

Once this happens, ALL mongo db request just timed out.

We don't know what triggered this condition to start though.
go.mongodb.org/mongo-driver/x/mongo/driver/topology.(*Topology).selectServerFromSubscription(0xc00056e8f0, 0x29b17a0, 0xc004a97d10, 0xc004582720, 0x296c700,
0xc000d8e6e0, 0xc0045826c0, 0xc0045826c0, 0x0, 0x0, ...)
/go/pkg/mod/go.mongodb.org/mongo-driver@v1.4.6/x/mongo/driver/topology/topology.go:435 +0x13c
go.mongodb.org/mongo-driver/x/mongo/driver/topology.(*Topology).SelectServer(0xc00056e8f0, 0x29b17a0, 0xc004a97d10, 0x296c700, 0xc000d8e6e0, 0x0, 0x0, 0x0, 0x0)
/go/pkg/mod/go.mongodb.org/mongo-driver@v1.4.6/x/mongo/driver/topology/topology.go:332 +0xfe
go.mongodb.org/mongo-driver/x/mongo/driver.Operation.selectServer(0xc0044e8c40, 0xc0014b68b0, 0xf, 0x297a9e0, 0xc00056e8f0, 0xc0044e8c50, 0x296c700, 0xc000d8e6e0, 0x39ddce0, 0xc00037dd30, ...)
/go/pkg/mod/go.mongodb.org/mongo-driver@v1.4.6/x/mongo/driver/operation.go:210 +0xd5
go.mongodb.org/mongo-driver/x/mongo/driver.Operation.Execute(0xc0044e8c40, 0xc0014b68b0, 0xf, 0x297a9e0, 0xc00056e8f0, 0xc0044e8c50, 0x296c700, 0xc000d8e6e0, 0x39ddce0, 0xc00037dd30, ...)
/go/pkg/mod/go.mongodb.org/mongo-driver@v1.4.6/x/mongo/driver/operation.go:238 +0xe5
go.mongodb.org/mongo-driver/x/mongo/driver/operation.(*Find).Execute(0xc000996380, 0x29b17a0, 0xc004a97d10, 0xc0007c8c00, 0x14)
/go/pkg/mod/go.mongodb.org/mongo-driver@v1.4.6/x/mongo/driver/operation/find.go:102 +0x22f
go.mongodb.org/mongo-driver/mongo.(*Collection).Find(0xc0045825a0, 0x29b17a0, 0xc004a97d10, 0x219eb80, 0xc000d8e3e0, 0xc001a43268, 0x1, 0x1, 0xc004a97d10, 0x30, ...)
/go/pkg/mod/go.mongodb.org/mongo-driver@v1.4.6/mongo/collection.go:1230 +0x669
github.com/getoutreach/azuresdk/cosmos.(*collection).getDocuments(0xc0009160f8, 0x29b17a0, 0xc004a979e0, 0x7f6a61b93518, 0xc004a97710, 0x29788e0, 0xc000d8e4c0, 0x495100, 0x0, 0x0)
/go/pkg/mod/github.com/getoutreach/azuresdk@v0.0.0-20210611003001-47584935650e/cosmos/collection.go:61 +0x233



 Comments   
Comment by Kevin Albertson [ 22/Jun/21 ]

Hello guowei.shieh@outreach.io, thank you for the report! The MongoDB drivers do not officially support connecting to CosmosDB. We are closing this since this does not appear to be a bug using the driver against MongoDB.

Generated at Thu Feb 08 08:37:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.