From 726e366d1baa316f0a6b07313176087610585fec Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Fri, 1 Mar 2024 17:59:41 +0100 Subject: [PATCH 1/3] Set minPoolSize for oplog Oplog has its specific startup, but it was missing a condition for minPoolSize which made it impossible to set minPoolSize for normal connection as setting it in the mongo settings would set it as well for oplog connection which would result in error as maxPoolSize for oplog is 1. So setting minPoolSize to 30 would result in failed startup on Galaxy when the oplog was started as minPoolSize for oplog could not be more than maxPoolSize (which is 1). --- packages/mongo/mongo_driver.js | 9 ++++++--- packages/mongo/oplog_tailing.js | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/mongo/mongo_driver.js b/packages/mongo/mongo_driver.js index f3be28c466..1639ba281b 100644 --- a/packages/mongo/mongo_driver.js +++ b/packages/mongo/mongo_driver.js @@ -172,6 +172,9 @@ MongoConnection = function (url, options) { // set it for replSet, it will be ignored if we're not using a replSet. mongoOptions.maxPoolSize = options.maxPoolSize; } + if (_.has(options, 'minPoolSize')) { + mongoOptions.minPoolSize = options.minPoolSize; + } // Transform options like "tlsCAFileAsset": "filename.pem" into // "tlsCAFile": "//filename.pem" @@ -788,7 +791,7 @@ MongoConnection.prototype.upsert = function (collectionName, selector, mod, var self = this; - + if (typeof options === "function" && ! callback) { callback = options; options = {}; @@ -844,7 +847,7 @@ MongoConnection.prototype.createIndexAsync = function (collectionName, index, MongoConnection.prototype.createIndex = function (collectionName, index, options) { var self = this; - + return Future.fromPromise(self.createIndexAsync(collectionName, index, options)); }; @@ -866,7 +869,7 @@ MongoConnection.prototype._ensureIndex = MongoConnection.prototype.createIndex; MongoConnection.prototype._dropIndex = function (collectionName, index) { var self = this; - + // This function is only used by test code, not within a method, so we don't // interact with the write fence. var collection = self.rawCollection(collectionName); diff --git a/packages/mongo/oplog_tailing.js b/packages/mongo/oplog_tailing.js index e2d5d7b52c..57a987a573 100644 --- a/packages/mongo/oplog_tailing.js +++ b/packages/mongo/oplog_tailing.js @@ -206,12 +206,12 @@ Object.assign(OplogHandle.prototype, { // The tail connection will only ever be running a single tail command, so // it only needs to make one underlying TCP connection. self._oplogTailConnection = new MongoConnection( - self._oplogUrl, {maxPoolSize: 1}); + self._oplogUrl, {maxPoolSize: 1, minPoolSize: 1}); // XXX better docs, but: it's to get monotonic results // XXX is it safe to say "if there's an in flight query, just use its // results"? I don't think so but should consider that self._oplogLastEntryConnection = new MongoConnection( - self._oplogUrl, {maxPoolSize: 1}); + self._oplogUrl, {maxPoolSize: 1, minPoolSize: 1}); // Now, make sure that there actually is a repl set here. If not, oplog // tailing won't ever find anything! From fd3ec08e5521fa9d621e2185c1e6877d3523bd2e Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Fri, 1 Mar 2024 18:09:48 +0100 Subject: [PATCH 2/3] Blaze reference update --- packages/non-core/blaze | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/non-core/blaze b/packages/non-core/blaze index c5e2cac242..adc11c9a8b 160000 --- a/packages/non-core/blaze +++ b/packages/non-core/blaze @@ -1 +1 @@ -Subproject commit c5e2cac242f4889972fb253401fbea5ddbfaee4d +Subproject commit adc11c9a8bd5d638100d8ff7fb6dc3dc095671e4 From 03a9d44c7c52b17dda80434ba588d20dd8d7195e Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:03:53 -0300 Subject: [PATCH 3/3] publish mongo 1.16.8 --- packages/mongo/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongo/package.js b/packages/mongo/package.js index ef44543d61..5fd1d27c2d 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.16.8', + version: '1.16.9', }); Npm.depends({