* Fix #5678 * Revert "Fix #5678" This reverts commit 106b6ddd9535da6ec323226c1b9ad649022aeb1e. * revert #5627
This commit is contained in:
@@ -126,8 +126,6 @@ export class MongoStorageAdapter implements StorageAdapter {
|
||||
client: MongoClient;
|
||||
_maxTimeMS: ?number;
|
||||
canSortOnJoinTables: boolean;
|
||||
databaseVersion: string;
|
||||
engine: string;
|
||||
|
||||
constructor({
|
||||
uri = defaults.DefaultMongoURI,
|
||||
@@ -138,7 +136,6 @@ export class MongoStorageAdapter implements StorageAdapter {
|
||||
this._collectionPrefix = collectionPrefix;
|
||||
this._mongoOptions = mongoOptions;
|
||||
this._mongoOptions.useNewUrlParser = true;
|
||||
this.engine = 'MongoDB';
|
||||
|
||||
// MaxTimeMS is not a global MongoDB client option, it is applied per operation.
|
||||
this._maxTimeMS = mongoOptions.maxTimeMS;
|
||||
@@ -962,15 +959,7 @@ export class MongoStorageAdapter implements StorageAdapter {
|
||||
}
|
||||
|
||||
performInitialization(): Promise<void> {
|
||||
// databaseVersion
|
||||
return this.connect()
|
||||
.then(() => {
|
||||
const adminDb = this.database.admin();
|
||||
return adminDb.serverStatus();
|
||||
})
|
||||
.then(status => {
|
||||
this.databaseVersion = status.version;
|
||||
});
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
createIndex(className: string, index: any) {
|
||||
|
||||
Reference in New Issue
Block a user