[DOCS-8430] your shell javascript has some problem code in collection.js Created: 27/Jul/16 Updated: 03/Nov/17 Resolved: 13/Aug/16 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | Server |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
macos 10.11 Location: https://docs.mongodb.com/manual/installation/?_ga=1.33512568.751647522.1464681992 |
||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Days since reply: | 7 years, 26 weeks, 4 days ago | ||||||||
| Description |
|
source code Version 3.2.3 if (this.getMongo().writeMode() == "commands") { return this._db.runCommand({createIndexes: this.getName(), indexes: indexSpecs}); } else if(this.getMongo().writeMode() == "compatibility") { // Use the downconversion machinery of the bulk api to do a safe write, report response as a // command response var result = this._db.getCollection("system.indexes").insert(indexSpecs , 0, true); if (result.hasWriteErrors() || result.hasWriteConcernError()) { // Return the first error var error = result.hasWriteErrors() ? result.getWriteErrors()[0] : result.getWriteConcernError(); return {ok : 0.0, code : error.code, errmsg : error.errmsg}; } else { return {ok : 1.0}; } } else { this._db.getCollection("system.indexes").insert(indexSpecs, 0, true); } } your code for (i = 0; i++; i < indexSpecs.length) { delete (indexSpecs[i].ns); // ns is passed to the first element in the command. } WILL NEVER BE EXECUTED |
| Comments |
| Comment by Ravind Kumar (Inactive) [ 13/Aug/16 ] |
|
Thank you for filing a DOCS ticket. The issue in question is actually more server related than docs - as of such, If you come across similar issues in the MongoDB source code, please raise a ticket in the SERVER project. |