Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Mongo 3.6 #9632

Closed
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions History.md
Expand Up @@ -67,6 +67,26 @@
`selftest.skip.define('some test', ...` will skip running "some test".
[PR #9579](https://github.com/meteor/meteor/pull/9579)

* Mongo has been upgraded to version 3.6.3 for 64-bit OS', and 3.2.19 for
32-bit OS'.
[PR #9632](https://github.com/meteor/meteor/pull/9632)

**NOTE:** After upgrading an application to use Mongo 3.6.2, it has been
observed ([#9591](https://github.com/meteor/meteor/issues/9591))
that attempting to run that application with an older version of
Meteor (via `meteor --release X`), that uses an older version of Mongo, can
prevent the application from starting. This can be fixed by either
running `meteor reset`, or by repairing the Mongo database. To repair the
database, find the `mongod` binary on your system that lines up with the
Meteor release you're jumping back to, and run
`mongodb --dbpath your-apps-db --repair`. For example:

```
/my-home/.meteor/packages/meteor-tool/1.6.0_1/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod --dbpath /my-app/.meteor/local/db --repair
```

[PR #9632](https://github.com/meteor/meteor/pull/9632)

* The `@babel/plugin-proposal-class-properties` plugin provided by
`meteor-babel` now runs with the `loose:true` option, as required by
other (optional) plugins like `@babel/plugin-proposal-decorators`.
Expand Down Expand Up @@ -106,6 +126,10 @@
[Feature #24](https://github.com/meteor/meteor-feature-requests/issues/24)
[PR #9657](https://github.com/meteor/meteor/pull/9657)

* Mongo has been upgraded to version 3.6.2 for 64-bit OS', and 3.2.18 for
32-bit OS'.
[PR #9632](https://github.com/meteor/meteor/pull/9632)

## v1.6.1, 2018-01-19

* Node has been updated to version
Expand Down
12 changes: 8 additions & 4 deletions packages/accounts-base/accounts_server.js
Expand Up @@ -556,8 +556,9 @@ Ap._initServerMethods = function () {

// Delete all the current user's tokens and close all open connections logged
// in as this user. Returns a fresh new login token that this client can
// use. Tests set Accounts._noConnectionCloseDelayForTest to delete tokens
// immediately instead of using a delay.
// use. Tests can override the default connection close delay
// (stored in CONNECTION_CLOSE_DELAY_MS) by setting
// Accounts._connectionCloseDelayMsForTests.
//
// XXX COMPAT WITH 0.7.2
// This single `logoutOtherClients` method has been replaced with two
Expand Down Expand Up @@ -594,12 +595,15 @@ Ap._initServerMethods = function () {
},
$push: { "services.resume.loginTokens": accounts._hashStampedToken(newToken) }
});
const connectionCloseDelay =
accounts._connectionCloseDelayMsForTests
? accounts._connectionCloseDelayMsForTests
: CONNECTION_CLOSE_DELAY_MS;
Meteor.setTimeout(function () {
// The observe on Meteor.users will take care of closing the connections
// associated with `tokens`.
accounts._deleteSavedTokensForUser(userId, tokens);
}, accounts._noConnectionCloseDelayForTest ? 0 :
CONNECTION_CLOSE_DELAY_MS);
}, connectionCloseDelay);
// We do not set the login token on this connection, but instead the
// observe closes the connection and the client will reconnect with the
// new token.
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-password/password_tests.js
@@ -1,4 +1,4 @@
Accounts._noConnectionCloseDelayForTest = true;
Accounts._connectionCloseDelayMsForTests = 1000;

if (Meteor.isServer) {
Accounts.removeDefaultRateLimit();
Expand Down
6 changes: 6 additions & 0 deletions packages/minimongo/local_collection.js
Expand Up @@ -1848,6 +1848,12 @@ const MODIFIERS = {
// native javascript numbers (doubles) so far, so we can't support $bit
throw MinimongoError('$bit is not supported', {field});
},
$v() {
// As discussed in https://github.com/meteor/meteor/issues/9623,
// the `$v` operator is not needed by Meteor, but problems can occur if
// it's not at least callable (as of Mongo >= 3.6). It's defined here as
// a no-op to work around these problems.
}
};

const NO_CREATE_MODIFIERS = {
Expand Down
12 changes: 6 additions & 6 deletions packages/npm-mongo/.npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/npm-mongo/package.js
Expand Up @@ -3,12 +3,12 @@

Package.describe({
summary: "Wrapper around the mongo npm package",
version: "2.2.33",
version: "2.2.34",
documentation: null
});

Npm.depends({
mongodb: "2.2.33"
mongodb: "2.2.34"
});

Package.onUse(function (api) {
Expand Down
6 changes: 3 additions & 3 deletions scripts/admin/test-packages-with-mongo-versions.rb
Expand Up @@ -7,8 +7,8 @@
require 'tmpdir'

mongo_install_urls = {
"3.4.9" => "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.9.tgz",
"3.2.15" => "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.2.15.tgz",
"3.6.3" => "https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.6.3.tgz",
"3.2.19" => "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.2.19.tgz",
"3.0.5" => "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.0.5.tgz",
"2.6.10" => "http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.6.10.tgz"
}
Expand All @@ -29,7 +29,7 @@

test_env = "TEST_PACKAGES_EXCLUDE=\"less\""

["3.4.9", "3.2.15", "3.0.5", "2.6.10"].each do |mongo_version|
["3.6.3", "3.2.19", "3.0.5", "2.6.10"].each do |mongo_version|
puts "Installing and testing with Mongo #{mongo_version}..."

Dir.mktmpdir "mongo_install" do |mongo_install_dir|
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-dev-bundle-common.sh
Expand Up @@ -6,8 +6,8 @@ set -u
UNAME=$(uname)
ARCH=$(uname -m)
NODE_VERSION=8.9.4
MONGO_VERSION_64BIT=3.4.10
MONGO_VERSION_32BIT=3.2.15
MONGO_VERSION_64BIT=3.6.3
MONGO_VERSION_32BIT=3.2.19
NPM_VERSION=5.6.0

# If we built Node from source on Jenkins, this is the build number.
Expand Down
6 changes: 3 additions & 3 deletions scripts/generate-dev-bundle.ps1
Expand Up @@ -219,11 +219,11 @@ Function Add-NodeAndNpm {
}

Function Add-Mongo {
# Mongo 3.4 no longer supports 32-bit (x86) architectures, so we package
# the latest 3.2 version of Mongo for those builds and 3.4+ for x64.
# Mongo >= 3.4 no longer supports 32-bit (x86) architectures, so we package
# the latest 3.2 version of Mongo for those builds and >= 3.4 for x64.
$mongo_filenames = @{
windows_x86 = "mongodb-win32-i386-${MONGO_VERSION_32BIT}"
windows_x64 = "mongodb-win32-x86_64-2008plus-${MONGO_VERSION_64BIT}"
windows_x64 = "mongodb-win32-x86_64-2008plus-ssl-${MONGO_VERSION_64BIT}"
}

$previousCwd = $PWD
Expand Down
13 changes: 12 additions & 1 deletion scripts/generate-dev-bundle.sh
Expand Up @@ -49,11 +49,22 @@ extractNodeFromTarGz || downloadNodeFromS3 || downloadOfficialNode
# by default. Will download a 32-bit version of Mongo if using a 32-bit based
# OS.
MONGO_VERSION=$MONGO_VERSION_64BIT
MONGO_SSL="-ssl"

# The MongoDB "Generic" Linux option is not offered with SSL, which is reserved
# for named distributions. This works out better since the SSL support adds
# size to the dev bundle though isn't necessary for local development.
if [ $UNAME = "Linux" ]; then
MONGO_SSL=""
fi

if [ $ARCH = "i686" ]; then
MONGO_VERSION=$MONGO_VERSION_32BIT
fi

MONGO_NAME="mongodb-${OS}-${ARCH}-${MONGO_VERSION}"
MONGO_TGZ="${MONGO_NAME}.tgz"
MONGO_NAME_SSL="mongodb-${OS}${MONGO_SSL}-${ARCH}-${MONGO_VERSION}"
MONGO_TGZ="${MONGO_NAME_SSL}.tgz"
MONGO_URL="http://fastdl.mongodb.org/${OS}/${MONGO_TGZ}"
echo "Downloading Mongo from ${MONGO_URL}"
curl "${MONGO_URL}" | tar zx
Expand Down
3 changes: 0 additions & 3 deletions tools/runners/run-mongo.js
Expand Up @@ -61,9 +61,6 @@ function spawnMongod(mongodPath, port, dbPath, replSetName) {
// Use mmapv1 on 32bit platforms, as our binary doesn't support WT
if (process.arch === 'ia32') {
args.push('--storageEngine', 'mmapv1', '--smallfiles');
} else {
// The WT journal seems to be at least 300MB, which is just too much
args.push('--nojournal');
}

return child_process.spawn(mongodPath, args, {
Expand Down