[DOCS-2777] Comment on: "manual/release-notes/2.6-upgrade.txt" Created: 23/Feb/14  Updated: 25/Feb/14  Resolved: 25/Feb/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.1, mongodb-2.6

Type: Improvement Priority: Critical - P2
Reporter: Linda Qin Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/master//release-notes/2.6-upgrade/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
Screen Resolution: 1920 x 1080
repo: docs
source: release-notes/2.6-upgrade


Participants:
Days since reply: 9 years, 51 weeks, 1 day ago

 Description   

In the step 2 to downgrade from MongoDB 2.5.x user authorization model to MongoDB 2.4 model, it uses bulk upsert to copy content of admin.system.users to admin.system.new_users.

var bulkUpsert = db.getSiblingDB("admin").system.new_users.initializeOrderedBulkOp();
 
db.getSiblingDB("admin").system.users.find().forEach(
   function (userDoc) {
      bulkUpsert.find( { _id: userDoc._id } ).upsert().replaceOne( userDoc );
   }
);
 
var res = bulkUpsert.execute();
print(tojson(res));

However, in a sharded cluster, it only supports batch sizes of one and w:0 write concern for config writes. So the bulk upsert in step 2 would fail as below:

admin@undefined> var res = bulkUpsert.execute();
2014-02-24T10:18:27.245+1100 Error: batch failed, cannot aggregate results: invalid batch request for config write at src/mongo/shell/bulk_api.js:696

It looks like we cannot use bulk upsert to copy the content of admin.system.users to admin.system.new_users. We need to update the document to provide another way to do this.



 Comments   
Comment by Githook User [ 25/Feb/14 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-2777 auth downgrade step
Branch: master
https://github.com/mongodb/docs/commit/3a65fef98146366553ca4b04ac8b935eea90e466

Comment by Linda Qin [ 24/Feb/14 ]

Same issue in Step 5 to copy content from admin.system.backup_users, created during the 2.6 upgrade, to admin.system.users

Generated at Thu Feb 08 07:44:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.