Skip to content

Releases: mongodb/mongo-java-driver

2.6.3

13 Sep 14:42
Compare
Choose a tag to compare

Java Driver 2.6.3 (June 08, 2011)

This release addresses bug fixes only.

  • Connector does not get started in one of the constructor, so replica set thread is not activated

Tickets

Full ticket information can be seen at http://jira.mongodb.org/browse/JAVA/fixforversion/10486

2.6.2

13 Sep 14:42
Compare
Choose a tag to compare

Java Driver 2.6.2 (June 02, 2011)

This release addresses bug fixes only.

  • Fixed GridFS file issues stemming from the default default byte[] encoding
  • Unclosed background connections connecting to replicasets (only an issue if not using Mongo as a singleton)
  • Race-condition on Mongo constructor with replicasets

Tickets

Full ticket information can be seen at http://jira.mongodb.org/browse/JAVA/fixforversion/10484

2.6.1

13 Sep 14:43
Compare
Choose a tag to compare

Java Driver 2.6.1 (May 29, 2011)

This release addresses bug fixes only.

  • Fixed incorrect implementation of the Binary/byte[] encoding (from the 2.6 release).

2.6

13 Sep 14:43
Compare
Choose a tag to compare
2.6

Java Driver 2.6 (May 27, 2011) (removed)

This release addresses bug fixes and includes some minor improvements.

Tickets

Full ticket information can be seen at http://jira.mongodb.org/browse/JAVA/fixforversion/10249

Breaking Changes

  • Changed default binary type (for java byte[]) from subtype 2->0. The will save 4 bytes but uses a different storage format on the server so it is not compatible for existing data; you will be able to save and read data without problem but searching against the data will result in inconsistent results. As you read and save data (using a byte[]) this will update the old subtype to the new one.

These are all bug-fixes but may affect your code if you depend on the buggy behavior.

  • JSON parser treated int/long values as longs -- reverted back to old behavior of converting to best fit
  • query/DBCursor.hint(DBObject) created an index name; very unlikely to be breaking in any way.

2.5.3

13 Sep 14:44
Compare
Choose a tag to compare

Java Driver 2.5.3 (Apr 6, 2011)

This is a minor release to fix some bugs introduced with other fixes in 2.5; no major functionality has changed.

Tickets

Full ticket information can be seen at http://jira.mongodb.org/browse/JAVA/fixforversion/10272

  • JAVA-315 Sometimes connections aren't returned to the pool; pool can be emptied incorrectly
  • JAVA-287 TCP_KEEPALIVE option
  • JAVA-313 WriteResult.getLastError().throwOnError() doesn't throw sometimes
  • JAVA-318 Support JMX on similar ServerAddresses
  • JAVA-312 JSON support for UUID

2.5.2

13 Sep 14:44
Compare
Choose a tag to compare

Java Driver 2.5.2 (Mar 24, 2011)

This is a minor release to fix some bugs introduced with other fixes in 2.5; no major functionality has changed.

Tickets

Full ticket information can be seen at http://jira.mongodb.org/browse/JAVA/fixforversion/10265

  • JAVA-304 Problems closing cursors with ids < 0

2.5.1

13 Sep 14:45
Compare
Choose a tag to compare

Java Driver 2.5.1 (Mar 23, 2011)

This is a minor release to fix some bugs introduced with other fixes in 2.5; no major functionality has changed.

Tickets

Full ticket information can be seen at http://jira.mongodb.org/browse/JAVA/fixforversion/10262

  • JAVA-278 findAndModify should not throw exceptions when no docs found
  • JAVA-301 replicaset w/auth warnings.

2.5

13 Sep 14:45
Compare
Choose a tag to compare
2.5

Java Driver 2.5 (Mar 10, 2011)

This release fixes many bugs reported against previous versions of the driver, and also introduces many improvements.

Changes include:

  • Mongo URI; The Mongo URI describes a set of servers with parameters which control the behavior of the driver in a single connection string; this string will be supported in other drivers.
  • ObjectId generated is now unique for each class loaders; this avoids possible collisions in some Java web servers and environments.
  • Replicaset Improvements: the driver now removes unused servers, detects passive nodes, and supports authentication.
  • Map/Reduce: supports the new Mongo 1.8 features, like advanced post-processing on results (replace, merge, reduce, inline).
  • Host-name resolution is now updated every 5min, making it possible to change the IP of mongod servers without restarting the client application.
  • Several Java properties were added to control the behavior of the driver (slave selection for reads, replica set check interval, etc).
  • Javadocs were thoroughly updated and now cover most of the driver.

Important Notes

  • The Mongo constructors have been simplified to only perform local initialization. As a result, no more network I/O is attempted in the constructor, and it is always possible to obtain a Mongo Instance even if no server is reachable. This follows the philosophy that constructors should be simple and errors should be handled when actual operations are called. In turn, if an application relied on the constructor throwing an exception, it should be modified.

Backward Compatibility

  • Map/Reduce: the simple M/R method was removed since it is now required to either specify an output collection, or select "INLINE" type.
  • GridFS: previously the driver would incorrectly store the "metadata" user-supplied object at the root of the gridfs file object. This has been fixed to store it under the "metadata" field, as described in the gridfs specs. This change is backward breaking for applications that stored metadata with previous drivers.
  • The ObjectId class has been refactored to fix several flaws notably for its compareTo() operator. As a result, the underlying BSON encoder/decoder was modified to write/read the ObjectID as big endian, as described by the BSON spec (as opposed to other data written little endian). This enabled to clean up the ObjectID class and improve its behavior. If using auto-generated ObjectID or ones created from String, the change in driver will not be noticeable. But if retrieving a record written with a previous driver and inspecting its machine ID or increment value, they will appear different with the new driver.
  • The exception hierarchies have changed and you should check that you are catching MongoException and not MongoInternalException as that is not thrown in the same places anymore.
  • findAndModify now returns the error from the server if no matching documents can be found for the update.

Tickets

Full ticket information can be seen at http://jira.mongodb.org

  • JAVA-263 NullPointerException due to race condition during concurrent access to DBTCPTransport
  • JAVA-85 CompareTo of ObjectId java driver returns different value than MongoDB implementation
  • JAVA-255 DBCollection.save(obj) does not use the default write concern
  • JAVA-151 Dot allowed in key names
  • JAVA-231 Failed to retrieve any result when using SlaveOK with all slaves are down
  • JAVA-248 For GridFS, driver should ensure indexes at startup on both files and chunks collection, when collection is small
  • JAVA-270 If authentication is on for a replica set, then most likely all writes will always fail once primary server dies
  • JAVA-224 Java driver doesn't automatically discover replica set passive nodes
  • JAVA-251 MapReduceOutput should support getting results inline, or from a collection in another db
  • JAVA-240 Mongo constructor should not attempt network connections and potentially throw exception that prevents app from starting
  • JAVA-227 NPE when replica set is down
  • JAVA-266 Need to update the IP resolved for hosts frequently enough to pick up dns changes
  • JAVA-269 NullPointerException when authentication used with replica sets not logged correctly
  • JAVA-241 driver has a bunch of hardcoded timing settings that many customers want to tweak
  • JAVA-276 findAndModify does not throw MongoException on error, fails silently
  • JAVA-256 fix all javadoc
  • JAVA-239 make sure src/main/org/bson has no mongodb deps
  • JAVA-273 many db commands (stats, list db, group, etc) should succeed if slaveOk=true and at least one server is up
  • JAVA-282 on ioexception, call to port.close() after putting back port in the pool, may break other thread that is using port
  • JAVA-281 when dropping a database or a collection, they remain in the driver cache, which can lead to problems
  • JAVA-257 when getLastError() is called on a WriteResult, behavior has several flaws
  • JAVA-275 with default write concern (no getLastError), if master changes in repl set, small edge case where writes will fail undetected
  • JAVA-258 Need oid in WriteResult
  • JAVA-174 prevent stack overflow in case of erroneous cyclic reference
  • JAVA-264 Deprecate DBCollection.getCount methods
  • JAVA-261 GridFSInputFile.getMetaData() returns wrong value
  • JAVA-279 ObjectId could generate duplicate ids if used in different classloader
  • JAVA-237 Should only have 1 DBCleanerThread per Mongo instance
  • JAVA-238 add optional parameter dropTarget to DBCollection.rename()
  • JAVA-247 authenticate method declares throw MongoException but doesn't actually throw it
  • JAVA-252 clean up the list of servers in replica based on list returned from isMaster
  • JAVA-267 update DBCusor .next() .hasNext() javadoc to say it can throw an exception WAS: MongoInternalException from DBCursor.hasNext() is inappropriate
  • JAVA-196 ReplicaSetStatus does not remove dead nodes automatically
  • JAVA-244 MongoURI for Java Driver should support all speced options (e.g. w, fsync, etc)
  • JAVA-289 driver does not allow doc sizes matching the server limit, for both insert and find