mongodb-js / mongodb-prebuilt

Install MongoDB prebuilt package using npm https://npmjs.org/package/mongodb-prebuilt
ISC License
56 stars 50 forks source link

Fix getMongodStartedExpression for newer versions #40

Open mkg20001 opened 7 years ago

mkg20001 commented 7 years ago

Newer versions of mongod don't print "wating for connections" (or it's now a debug message)

This line seems to indicate mongod is ready

Fixes #45

winfinit commented 7 years ago

This will break package for people that are setting versions

On Jun 27, 2017, at 7:29 AM, Maciej Krüger notifications@github.com wrote:

Newer versions of mongod don't print "wating for connections" (or it's now a debug message)

This line seems to indicate mongod is ready

You can view, comment on, or merge this pull request online at:

https://github.com/winfinit/mongodb-prebuilt/pull/40

Commit Summary

Fix getMongodStartedExpression for newer versions File Changes

M src/mongod-helper.ts (2) Patch Links:

https://github.com/winfinit/mongodb-prebuilt/pull/40.patch https://github.com/winfinit/mongodb-prebuilt/pull/40.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

mkg20001 commented 7 years ago

Oh, didn't think about that. Maybe that should be dynamic based on the version. I just don't know at which version the regex broke. (And I also have never written typescript)

winfinit commented 7 years ago

I will check this out sometime this week also, I am wondering if dev release of mongo is broken and maybe we don't need to do much here... another thing that I would like to figure out is how to get latest production release instead of dev build.

On Jun 27, 2017, at 9:08 AM, Maciej Krüger notifications@github.com wrote:

Oh, didn't think about that. Maybe that should be dynamic based on the version. I just don't know at which version the regex broke. (And I also have never written typescript)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

StarpTech commented 7 years ago

@winfinit This would also fix https://github.com/winfinit/mongodb-prebuilt/issues/41 but it seems that it is not consistent because on windows the old message is still there waiting for connections on port but on linux only \[initandlisten\] setting featureCompatibilityVersion is logged

StarpTech commented 7 years ago

@mkg20001 where did you get this information? When its correct we should check for both

StarpTech commented 7 years ago

I found it.

Windows https://github.com/mongodb/mongo/blob/477a40cc79c11ac18839997daf4301c2e4c748b1/src/mongo/util/net/listen.cpp#L244

Linux https://github.com/mongodb/mongo/blob/477a40cc79c11ac18839997daf4301c2e4c748b1/src/mongo/util/net/listen.cpp#L272

there are two different logs which indicates that the server is ready. @mkg20001 please add both messages and we are save.

mkg20001 commented 7 years ago

Done

StarpTech commented 7 years ago

BTW: to check that mongodb is running with this method is really bad we should check this with a db command in certain intervals.

StarpTech commented 7 years ago

Hi @winfinit could you verify it and merge it ?

StarpTech commented 7 years ago

@winfinit please review

StarpTech commented 7 years ago

@winfinit it would be great if you have a look.

StarpTech commented 6 years ago

@winfinit ???

mkg20001 commented 6 years ago

@winfinit ??

hems commented 5 years ago

??

csprocket777 commented 3 years ago

Was this ever resolved? This is a blocker for me currently.