Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-910

config.shard docs have elements of type -1

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • None

    Description

      Expected:

      Mongo m = new Mongo("config");
      DBCollection coll = m.getCollection("shard");
      DBObject f = coll.findOne();

      works. Actual:

      ~/gitroot/java-driver$ java com.mongodb.Tester
      Apr 22, 2009 5:44:58 PM com.mongodb.DBTCP <init>
      INFO: 127.0.0.1:27017/config
      Exception in thread "main" java.lang.UnsupportedOperationException: can't handle : -1
      at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:247)
      at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:232)
      at com.mongodb.ByteDecoder.readObject(ByteDecoder.java:104)
      at com.mongodb.DBApiLayer$SingleResult.<init>(DBApiLayer.java:534)
      at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:415)
      at com.mongodb.DBCollection.findOne(DBCollection.java:258)
      at com.mongodb.DBCollection.findOne(DBCollection.java:249)
      at com.mongodb.Tester.main(Tester.java:9)

      Aaron says to mention that BSONObj clientReadable() const; is the relevant function.

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            kristina Kristina Chodorow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: