[SERVER-4233] corruption during '$set' operation Created: 09/Nov/11 Updated: 11/Jul/16 Resolved: 16/Dec/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 1.8.4 |
| Fix Version/s: | 1.8.5 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Dominik Gehl | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux |
||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
Let's assume we have the following record
and update it with the following code
Everything seems to work out ok, but info.Se actually was not updated but duplicated !
|
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 13/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Going to try to get it in for 1.8.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 12/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Will this be fixed for the 1.8 branch ? | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 12/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Traced it back to this fix: | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 11/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Interesting that the bug is not present on Windows ... I did my tests on Linux 64bit (Ubuntu 11.04) | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by galam yum [ 11/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
hi... I just ran the test with 1.8.4 & pymongo 2.0.01 on windows 7 64 bit. it worked fine...no duplication. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 11/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
test with fails on 1.8.4, but works in 2.0.1 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 11/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
A test case in the form of one of our javascript cases would be best. See: | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 11/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, everything above is when running it under 1.8. I'm worried about this kind of bug for 2 reasons:
Could you give me explicit specs for the 'test case' you mention (i.e. how would it be different from the mongo shell interaction I put into the initial ticket submission) ? | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 11/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
If you provide a test case, would be easy to see where it started working precisely. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 11/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
That's all with 1.8? | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 09/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
What's happening in the PHP driver seems to be consistent with what I get when I use mongoexport
So apparently, the second info.Se in the document has only a 'start' property, but no 'stop' property. Inside PHP this second info.Se overwrites the first one. But, this is then inconsistent with the mongo shell which shows twice an identical info.Se | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 09/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Another remark: if I try to read the data back using the PHP driver, I don't even get the same data as in the mongo shell
info.Se is there (once - not really surprising since PHP will allow only once a given key), but the stop property has disappeared ! | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 09/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hmmm... I've read
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eliot Horowitz (Inactive) [ 09/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is a manifestation of | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dominik Gehl [ 09/Nov/11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
The issue doesn't seem to be present in 2.0.1 |