This commit is contained in:
2020-08-20 11:44:32 +02:00
parent 4715fc1814
commit 6aceefeb2f
2891 changed files with 11239 additions and 347539 deletions

View File

@@ -82,7 +82,7 @@ var legalOptionNames = [
* @param {object} [options.socketOptions] Socket options
* @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
* @param {boolean} [options.socketOptions.keepAlive=true] TCP Connection keep alive enabled
* @param {number} [options.socketOptions.keepAliveInitialDelay=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket
* @param {number} [options.socketOptions.keepAliveInitialDelay=120000] The number of milliseconds to wait before initiating keepAlive on the TCP socket
* @param {number} [options.socketOptions.connectTimeoutMS=10000] How long to wait for a connection to be established before timing out
* @param {number} [options.socketOptions.socketTimeoutMS=360000] How long a send or receive on a socket can take before timing out
* @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.

View File

@@ -92,7 +92,7 @@ var legalOptionNames = [
* @param {object} [options.socketOptions] Socket options
* @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
* @param {boolean} [options.socketOptions.keepAlive=true] TCP Connection keep alive enabled
* @param {number} [options.socketOptions.keepAliveInitialDelay=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket
* @param {number} [options.socketOptions.keepAliveInitialDelay=120000] The number of milliseconds to wait before initiating keepAlive on the TCP socket
* @param {number} [options.socketOptions.connectTimeoutMS=10000] How long to wait for a connection to be established before timing out
* @param {number} [options.socketOptions.socketTimeoutMS=360000] How long a send or receive on a socket can take before timing out
* @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.

View File

@@ -84,7 +84,7 @@ var legalOptionNames = [
* @param {boolean} [options.socketOptions.autoReconnect=true] Reconnect on error.
* @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
* @param {boolean} [options.socketOptions.keepAlive=true] TCP Connection keep alive enabled
* @param {number} [options.socketOptions.keepAliveInitialDelay=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket
* @param {number} [options.socketOptions.keepAliveInitialDelay=120000] The number of milliseconds to wait before initiating keepAlive on the TCP socket
* @param {number} [options.socketOptions.connectTimeoutMS=10000] How long to wait for a connection to be established before timing out
* @param {number} [options.socketOptions.socketTimeoutMS=360000] How long a send or receive on a socket can take before timing out
* @param {number} [options.reconnectTries=30] Server attempt to reconnect #times

View File

@@ -3,7 +3,7 @@
const EventEmitter = require('events'),
MongoError = require('../core').MongoError,
f = require('util').format,
translateReadPreference = require('../utils').translateReadPreference,
ReadPreference = require('../core').ReadPreference,
ClientSession = require('../core').Sessions.ClientSession;
// The store of ops
@@ -293,7 +293,7 @@ class TopologyBase extends EventEmitter {
// Command
command(ns, cmd, options, callback) {
this.s.coreTopology.command(ns.toString(), cmd, translateReadPreference(options), callback);
this.s.coreTopology.command(ns.toString(), cmd, ReadPreference.translate(options), callback);
}
// Insert
@@ -314,7 +314,7 @@ class TopologyBase extends EventEmitter {
// IsConnected
isConnected(options) {
options = options || {};
options = translateReadPreference(options);
options = ReadPreference.translate(options);
return this.s.coreTopology.isConnected(options);
}
@@ -327,7 +327,7 @@ class TopologyBase extends EventEmitter {
// Cursor
cursor(ns, cmd, options) {
options = options || {};
options = translateReadPreference(options);
options = ReadPreference.translate(options);
options.disconnectHandler = this.s.store;
options.topology = this;