Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endless busy loop when primary mongod are going down. #68

Open
Blaumeiser opened this issue Apr 11, 2011 · 0 comments
Open

endless busy loop when primary mongod are going down. #68

Blaumeiser opened this issue Apr 11, 2011 · 0 comments

Comments

@Blaumeiser
Copy link

There is a busy loop in the source code which may result in an infinite loop.

namespace Norm.Protocol.Messages
{
...
public ReplyMessage Execute()
{
...
var stream = _connection.GetStream();
while (!stream.DataAvailable)
{
Thread.Sleep(1);
}
...

When you shut down the mongod primary the property stream.DataAvailable will always return false and there is no Exception being thrown. So when you shut down the primary mongod (and another gets primary), this source code results in an infinite busy loop.

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

No branches or pull requests

1 participant