Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1277

Sending queries to $cmd causes the server to reject the query.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.0
    • Operations
    • None

    Description

      The driver wraps all queries in the $query meta operator. However, the $cmd collection doesn't seem to respect that and closes the connection causing an EndOfStreamException in the driver.

      The does NOT affect general purpose commands. Rather, it affects something like this, getting the current op:

      var result = client
                      .GetDatabase("admin")
                      .GetCollection<BsonDocument>("$cmd.sys.inprog")
                      .Find(new BsonDocument("$all", true))
                      .ToListAsync()
                      .GetAwaiter().GetResult();
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: