[SERVER-13129] db.upgradeCheck() no longer checks all collections by default, and ignores db parameter Created: 11/Mar/14  Updated: 11/Jul/16  Resolved: 12/Mar/14

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.6.0-rc1
Fix Version/s: 2.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Andre de Frere Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-2894 db.UpgradeCheckAllDbs() is undocumented Closed
is related to SERVER-8391 Pre-flight upgrade tool to check for ... Closed
Operating System: ALL
Participants:

 Description   

In 2.6.0-rc1 db.upgradeCheck() will return an error if run with no parameters:

> db.upgradeCheck()
database 'test' for 2.6 upgrade compatibility
 
Checking database test
2014-03-11T13:18:19.859+1100 ReferenceError: dbName is not defined at src/mongo/shell/upgrade_check.js:141

but if a dbname is specified, an error will be returned indicating a collection was not specified:

> db.upgradeCheck({ db : "test" } )
2014-03-11T13:19:16.004+1100 Error: When providing an argument to upgradeCheck, it must be of the form {collection: <collectionNameString>}. Otherwise, it will check every collection in the database. If you would like to check all databases, run db.upgradeCheckAllDbs() from the admin database. at src/mongo/shell/upgrade_check.js:132

The db parameter is no longer being checked at all, only the collection. This makes it impossible to check a single database, only a collection in a database or all databases (with db.upgradeCheckAllDbs())



 Comments   
Comment by Githook User [ 12/Mar/14 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-13129 fix upgradeCheck() to run on entire database when passed no argument
Branch: master
https://github.com/mongodb/mongo/commit/7d165159a265630e3059abdbfc1d09bf6c1fbe29

Comment by Matt Dannenberg [ 11/Mar/14 ]

When run without an argument, it should check the entire database. So, the former is a bug that will be fixed. The db parameter has been removed in favor of this new interface.

Generated at Thu Feb 08 03:30:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.