Skip to content

Comments

[FIX] MongoError during startup saying "ns not found"#24015

Merged
sampaiodiego merged 1 commit intodevelopfrom
fix-ns-not-found-error
Dec 29, 2021
Merged

[FIX] MongoError during startup saying "ns not found"#24015
sampaiodiego merged 1 commit intodevelopfrom
fix-ns-not-found-error

Conversation

@sampaiodiego
Copy link
Member

Proposed changes (including videos or screenshots)

During a mutli-instance startup, if there is more than one instance being started at the same time, they will all try to execute the same drop command, but just a single one would succeed and the other ones would show the error below:

=== UnHandledPromiseRejection ===
MongoError: ns not found
    at MessageStream.messageHandler (/.../.meteor/packages/npm-mongo/.3.9.1.gjvjg.whtjk6++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/cmap/connection.js:272:20)
    at MessageStream.emit (events.js:314:20)
    at MessageStream.EventEmitter.emit (domain.js:483:12)
    at processIncomingData (/.../.meteor/packages/npm-mongo/.3.9.1.gjvjg.whtjk6++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
...

So instead of dropping the collection, I'm changing to just remove the content of the collection.

Issue(s)

Closes #15485

Steps to test or reproduce

Further comments

@sampaiodiego sampaiodiego changed the title [FIX] Error during startup saying "ns not found" [FIX] MongoError during startup saying "ns not found" Dec 22, 2021
@sampaiodiego sampaiodiego merged commit 0244764 into develop Dec 29, 2021
@sampaiodiego sampaiodiego deleted the fix-ns-not-found-error branch December 29, 2021 18:26
@sampaiodiego sampaiodiego mentioned this pull request Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MongoError: ns not found

2 participants