Skip to content

Commit c7b840e

Browse files
authored
Merge pull request #618 from wolrajhti/master
Update mongodb to ^3.6.4
2 parents f647796 + 833762d commit c7b840e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

lib/mongodb.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ exports.initialize = function initializeDataSource(dataSource, callback) {
105105

106106
s.safe = s.safe !== false;
107107
s.w = s.w || 1;
108+
s.writeConcern = s.writeConcern || {
109+
w: s.w,
110+
wtimeout: s.wtimeout || null,
111+
j: s.j || null,
112+
journal: s.journal || null,
113+
fsync: s.fsync || null,
114+
};
108115
s.url = s.url || generateMongoDBURL(s);
109116
s.useNewUrlParser = s.useNewUrlParser !== false;
110117
s.useUnifiedTopology = s.useUnifiedTopology !== false;
@@ -251,9 +258,6 @@ MongoDB.prototype.connect = function(callback) {
251258
'acceptableLatencyMS',
252259
'connectWithNoPrimary',
253260
'authSource',
254-
'w',
255-
'wtimeout',
256-
'j',
257261
'forceServerObjectId',
258262
'serializeFunctions',
259263
'ignoreUndefined',
@@ -278,13 +282,13 @@ MongoDB.prototype.connect = function(callback) {
278282
'password',
279283
'authMechanism',
280284
'compression',
281-
'fsync',
282285
'readPreferenceTags',
283286
'numberOfRetries',
284287
'auto_reconnect',
285288
'minSize',
286289
'useNewUrlParser',
287290
'useUnifiedTopology',
291+
'writeConcern',
288292
// Ignored options
289293
'native_parser',
290294
// Legacy options
@@ -293,6 +297,11 @@ MongoDB.prototype.connect = function(callback) {
293297
'replSet',
294298
'mongos',
295299
'db',
300+
'w',
301+
'wtimeout',
302+
'j',
303+
'journal',
304+
'fsync',
296305
];
297306

298307
const lbOptions = Object.keys(self.settings);

0 commit comments

Comments
 (0)