[SERVER-1821] Cannot update a collection using $inc modifier using a geo $center query unless the fields already exist in the matched documents Created: 21/Sep/10 Updated: 12/Jul/16 Resolved: 22/Nov/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 1.6.2 |
| Fix Version/s: | 1.7.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sam Murphy | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OSX 64bit, Snow Leopard, Macbook |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
db.createCollection("points"); ) for(var x = 0; x < 10; x = x + 1) { ); // Run geo $inc }}, {'$inc' : { 'test' : 1}}, false, true); ///////////////// // Run a non-geo $inc // No error // Re-run geo $inc }}, {'$inc' : { 'test' : 1}}, false, true); // No error |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 09/Nov/10 ] |
|
this is a bit trickier than expected. almost have to make Geo*Cursor yield safe... |
| Comment by auto [ 27/Sep/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: test for |
| Comment by Sam Murphy [ 27/Sep/10 ] |
|
It was my understanding from the documentation that an $inc will create fields if they do not exist. In the test file the "z" field is created prior to using an $inc. I believe that removing that will create an error. Is is expected that the fields being incremented have to exist in advance? |
| Comment by Eliot Horowitz (Inactive) [ 24/Sep/10 ] |
|
Added a test that does exactly this that seems to work fine. |
| Comment by auto [ 24/Sep/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: test for |