[SERVER-5604] update fails silently when notablescans=true Created: 14/Apr/12 Updated: 09/Jul/16 Resolved: 10/Oct/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Nic Cottrell (Personal) | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL5 |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
I have
Running on the console, neither:
Running:
|
| Comments |
| Comment by Scott Hernandez (Inactive) [ 14/May/12 ] | ||||||||||||||
|
yeah, I think you are seeing the behavior of a sparse index interacting poorly with the query. Can you do the update and check the results right after like I do on the second line?
If you have an example script to create the docs/index and do the query/update that would be helpful. Here is a sample I tested with, let me know if this looks the same as yours.
| ||||||||||||||
| Comment by Nic Cottrell (Personal) [ 14/Apr/12 ] | ||||||||||||||
|
Yeah, I have several multi-key sparse indexes. According to my notes, I created it like: db.Example.ensureIndex( {cl:1, l:1}, {sparse: true, background:true}); , {sparse:true,background:true}); Maybe the background flag is letting it slip through. | ||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 14/Apr/12 ] | ||||||||||||||
|
Yes, when you search for $exists:false with a sparse index the results are not what is generally expected since the sparse index can't return docs which aren't in the index : There are also some cases where notablescan does not cause an error : SERVER-2222 Can you post how you created the index? Sparse indexes are currently limited to 1 field so you shouldn't be able to create a sparse index with a compound key. | ||||||||||||||
| Comment by Nic Cottrell (Personal) [ 14/Apr/12 ] | ||||||||||||||
|
Update: restarted with notablescan disabled... This returns results: But this makes no updates/changes, and just exits after less than a second: Is this a logic error due to the sparse index? |