File tree 4 files changed +7
-3
lines changed
templates/Web/_composition
AspNet/Feature.AspNet.Azure.Cosmos.Mongo/backend
Flask/Feature.Flask.Azure.Cosmos.Mongo/backend/mongo
MoleculerJS/Feature.Moleculer.Azure.Cosmos.Mongo/backend/mixins
NodeJS/Feature.Node.Azure.Cosmos.Mongo/backend/mongo
4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ private IMongoClient InitializeCosmosClientInstance()
34
34
35
35
settings . UseTls = true ;
36
36
settings . SslSettings = new SslSettings ( ) { EnabledSslProtocols = SslProtocols . Tls12 } ;
37
+ settings . RetryWrites = false ;
37
38
38
39
return new MongoClient ( settings ) ;
39
40
}
Original file line number Diff line number Diff line change 7
7
8
8
9
9
10
- client = MongoClient (connection_str + '?ssl=true&replicaSet=globaldb' )
10
+ client = MongoClient (connection_str + '?ssl=true&replicaSet=globaldb&retryWrites=false ' )
11
11
12
12
db = client [CONSTANTS ['COSMOS' ]['COLLECTION' ]]
13
13
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ module.exports = opt => {
19
19
password : process . env . COSMOSDB_PASSWORD
20
20
} ,
21
21
useNewUrlParser : true ,
22
- useUnifiedTopology : true
22
+ useUnifiedTopology : true ,
23
+ retryWrites : false
23
24
}
24
25
) ,
25
26
// Set DB collection name
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ function connect() {
11
11
user : process . env . COSMOSDB_USER ,
12
12
password : process . env . COSMOSDB_PASSWORD
13
13
} ,
14
- useNewUrlParser : true
14
+ useNewUrlParser : true ,
15
+ useUnifiedTopology : true ,
16
+ retryWrites : false
15
17
} )
16
18
. then ( ( ) => console . log ( "Connection to CosmosDB successful" ) )
17
19
. catch ( err => console . error ( err ) ) ;
You can’t perform that action at this time.
0 commit comments