[SERVER-14886] Updates against paths composed with array index notation and positional operator fail with error Created: 13/Aug/14 Updated: 11/Jul/16 Resolved: 20/Nov/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.6.3, 2.6.4 |
| Fix Version/s: | 2.6.6, 2.8.0-rc1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Bersam Karbasion | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||
| Steps To Reproduce: | I get that error on these queries:
or this one StackOverFlow
|
||||||||||||||||||||||||
| Sprint: | Query 2.7.8 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
I'm using "$" positional per update in a project, It was working without any problem in Ubuntu (mongoDB 2.4), I cloned the project into Archlinux and i get this error on db.collection.update:
while I'm sure that the find query always match only one object in mongoDB. |
| Comments |
| Comment by Githook User [ 20/Nov/14 ] | ||||||||||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: (cherry picked from commit acc09c2ec26b27c6d201f5f98a2a9c7b4215b1ae) | ||||||||||||||||||||||
| Comment by Githook User [ 20/Nov/14 ] | ||||||||||||||||||||||
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: | ||||||||||||||||||||||
| Comment by J Rassi [ 13/Aug/14 ] | ||||||||||||||||||||||
|
Thanks for the sample document. Please continue to watch this ticket for updates. | ||||||||||||||||||||||
| Comment by Bersam Karbasion [ 13/Aug/14 ] | ||||||||||||||||||||||
|
@Jason
| ||||||||||||||||||||||
| Comment by J Rassi [ 13/Aug/14 ] | ||||||||||||||||||||||
|
I'm able to reproduce this on 2.6.0 through 2.6.4. It looks like an issue that affects use of array index notation combined with use of the positional operator in an update path.
Note that the issue does not manifest if the positional operator precedes the array index in the update path:
I confirm these updates succeed correctly on 2.4.10. Assigning to hari.khalsa@10gen.com for triage. | ||||||||||||||||||||||
| Comment by J Rassi [ 13/Aug/14 ] | ||||||||||||||||||||||
|
Could you supply the output of running the following at the shell?
| ||||||||||||||||||||||
| Comment by Bersam Karbasion [ 13/Aug/14 ] | ||||||||||||||||||||||
|
I forgot to mention that the same code without a single change of code would work on mongoDB server version 2.4. |