[SERVER-12540] GLE doesn't set error for failed index builds Created: 29/Jan/14 Updated: 03/Feb/14 Resolved: 03/Feb/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 2.5.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeremy Mikola | Assignee: | Jeremy Mikola |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
On the latest 2.5.x nightly, 92cf0713b74ce2f8b011e6768a66c4e99d75a8ea, failed index builds appear to be NOOPS:
Note that the nightly above is prior to the new createIndexes command for On 2.4.9, failed index builds yield an error:
|
| Comments |
| Comment by Jeremy Mikola [ 03/Feb/14 ] | ||||||||||||||||||||
|
renctan: I retested with 2.5.5:
Looks like we're all good here. | ||||||||||||||||||||
| Comment by Jeremy Mikola [ 30/Jan/14 ] | ||||||||||||||||||||
|
renctan: I was running the script in the issue description on a nightly before your recent commits, so the index creation was doing an insert operation. And that was likely using the new write command, so it makes sense that GLE wouldn't report anything. The ensureIndex and createIndex methods were as follows:
In light of that, it looks like this is all addressed by https://github.com/mongodb/mongo/commit/22a35b2aa4985cfead698920d015f691b11076f0. | ||||||||||||||||||||
| Comment by Randolph Tan [ 30/Jan/14 ] | ||||||||||||||||||||
|
I don't think it is valid to call getLastError to get errors after ensureIndex in the shell (when talking to a new server) anymore. The correct way to get the error is to examine the return value of the ensureIndex method (which used to call the insert write command and switched to call the createIndexes command) - no return value if no error and returns the command response object otherwise. | ||||||||||||||||||||
| Comment by Jeremy Mikola [ 30/Jan/14 ] | ||||||||||||||||||||
|
dan@10gen.com: The latest nightly is mongodb-linux-x86_64-2014-01-23. renctan's fix for | ||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 30/Jan/14 ] | ||||||||||||||||||||
|
looks like a duplicate of |