Skip to content

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

Description

@Blaumeiser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions