mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Improve primary detection mechanism to be compatible with older mongodb instances
Generate 2.6 beta 2
This commit is contained in:
committed by
Filipe Névola
parent
c8eb086116
commit
c4d4ea2a09
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: 'allow-deny',
|
||||
version: '1.1.1-beta260.1',
|
||||
version: '1.1.1-beta260.2',
|
||||
// Brief, one-line summary of the package.
|
||||
summary: 'Implements functionality for allow/deny and client-side db operations',
|
||||
// URL to the Git repository containing the source code for this package.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'The Meteor command-line tool',
|
||||
version: '2.6.0-beta.1',
|
||||
version: '2.6.0-beta.2',
|
||||
});
|
||||
|
||||
Package.includeTool();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Meteor's client-side datastore: a port of MongoDB to Javascript",
|
||||
version: '1.8.0-beta260.1'
|
||||
version: '1.8.0-beta260.2'
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
@@ -195,12 +195,15 @@ MongoConnection = function (url, options) {
|
||||
try {
|
||||
const helloDocument = db.admin().command({hello: 1}).await();
|
||||
// First, figure out what the current primary is, if any.
|
||||
if (helloDocument.isWritablePrimary) {
|
||||
if (helloDocument.primary) {
|
||||
self._primary = helloDocument.primary;
|
||||
}
|
||||
}catch(_){
|
||||
if (db.serverConfig && db.serverConfig.isMasterDoc) {
|
||||
self._primary = db.serverConfig.isMasterDoc.primary;
|
||||
// ismaster command is supported on older mongodb versions
|
||||
const isMasterDocument = db.admin().command({ismaster:1}).await();
|
||||
// First, figure out what the current primary is, if any.
|
||||
if (isMasterDocument.primary) {
|
||||
self._primary = isMasterDocument.primary;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
Package.describe({
|
||||
summary: "Adaptor for using MongoDB and Minimongo over DDP",
|
||||
version: '1.14.0-beta260.1'
|
||||
version: '1.14.0-beta260.2'
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Package.describe({
|
||||
summary: "Wrapper around the mongo npm package",
|
||||
version: "4.3.0-beta260.1",
|
||||
version: "4.3.0-beta260.2",
|
||||
documentation: null
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Tiny testing framework",
|
||||
version: '1.2.1-beta260.1'
|
||||
version: '1.2.1-beta260.2'
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"track": "METEOR",
|
||||
"version": "2.6-beta.1",
|
||||
"version": "2.6-beta.2",
|
||||
"recommended": false,
|
||||
"official": false,
|
||||
"description": "Meteor experimental release"
|
||||
|
||||
Reference in New Issue
Block a user