[SERVER-3169] Upserts are not reaching documents Created: 30/May/11 Updated: 29/May/12 Resolved: 10/Sep/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Stability |
| Affects Version/s: | 1.8.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | cristian gonzalez | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | Upsert, exception | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
first 1.6.5 then 1.8.1 |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
While running ./mongostat, from one day to another, my document update-count decreased a lot (from 1000 docs/secs to only +-50)
After migrating, the error persists. I'd appreciate any clue to this issue.... ------------ THESE ARE COMMON UPSERT OPERATIONS USING JAVA DRIVER (these upserts doesnt look to be updating anything) DEBUG [scheduler-1] 30 May 2011 21:33:01 (BaseMongoPersister.java:302) - Upsert to dayByCountry Obj: { "$set" : { "day" : { "$date" : "2011-05-30T00:00:00Z"}, "client" : "myclient" , "country" : "ke"} , "$inc" : { "counters.120.h" : 2 , "counters.301.h" : 1 , "counters.281.h" : 2 , "counters.139.h" : 2 , "counters.119.h" : 2 , "counters.508.h" : 2 , "counters.303.h" : 2 , "counters.299.h" : 1 , "counters.147.h" : 2 , "counters.432.h" : 2 , "counters.81.h" : 2 , "counters.285.h" : 1 , "urlCounters.461.h" : 2 , "domainCounters.d1*openx*org.h" : 2 , "hitCount" : 2}} USING Query: { "day" : { "$date" : "2011-05-30T00:00:00Z"} , "country" : "ke" , "client" : "myclient"} -------------- VERIFYING EXISTANCE OF DOCUMENTS To verify documents that should be reached by upserts, which instead are failing (see errors below) > db.dayByCountry.find({"country":"gb", "client":"myclient", "day": {"$gte": new Date(2011, 4, 30, 0), "$lte": new Date(2011, 4, 30, 0)}}, {"hitCount": 1, "day":1}) { "_id" : ObjectId("4de2de3a79d39014de0ac86a"), "day" : ISODate("2011-05-30T00:00:00Z"), "hitCount" : 1384761 }So document exists... -------------- EXTRACT OF MONGO-LOG Mon May 30 21:25:36 [conn5] update pixserverHits.dayByCountry query: { day: new Date(1306713600000), country: "gb", client: "myclient" } exception 0 assertion db/update.cpp:686 24ms exception 0 assertion db/update.cpp:686 25ms exception 0 assertion db/update.cpp:686 49ms ------------- RESULTS WHEN DOING VALIDATION > db.dayByCountry.validate() |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 02/Sep/11 ] |
|
Sorry for the delay, is this still an issue? |
| Comment by cristian gonzalez [ 07/Jun/11 ] |
|
I cannot isolate the code to deliver anything useful... |
| Comment by Eliot Horowitz (Inactive) [ 01/Jun/11 ] |
|
The ops are inactive, so the data could be invalid. |
| Comment by cristian gonzalez [ 01/Jun/11 ] |
|
Look at fields: "query" and :"ns" "opid" : 4991104, The value "month" in "query" is incorrect for this collection (?ixserverHits.dayByCountry) |
| Comment by Eliot Horowitz (Inactive) [ 01/Jun/11 ] |
|
1) I don't understand. Do you have code to reproduce? |
| Comment by cristian gonzalez [ 31/May/11 ] |
|
I post here something more Interesting... not sure if it's ok to analyze it this way ... but... 1) at first sight looking like the bug: the query for each operation indicates usage of inverted keys... This would explain the situation ? 2) the NS field has a "?" in the name, is that ok ? (real name is "pixserverHits") > db.currentOP() , , , , , , , , |
| Comment by Scott Hernandez (Inactive) [ 31/May/11 ] |
|
Can you provide a sample program to reproduce this? |