[SERVER-3447] journal exception during large operations within db.eval (multi update) Created: 19/Jul/11 Updated: 12/Jul/16 Resolved: 01/Aug/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Stability, Storage |
| Affects Version/s: | 1.8.2 |
| Fix Version/s: | 1.9.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | chrisferry@gmail.com | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
CentOS 5.6 |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Query is: , Collection has 700k entries and the raw bson is about 685MB If we turn journaling off the query completes and mongo doesn't die. Attached mongodb.log. Pertinent lines: Mon Jul 18 21:37:43 [conn88] dbexception in groupCommit causing immediate shutdown: 0 assertion util/alignedbuilder.cpp:52 |
| Comments |
| Comment by auto [ 04/Aug/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: Revert " This reverts commit 3b4b0026cd2e018346bf068109ba0a9368a07eeb. |
| Comment by auto [ 04/Aug/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: backport of |
| Comment by auto [ 03/Aug/11 ] |
|
Author: {u'login': u'dwight', u'name': u'dwight', u'email': u'dwight@10gen.com'}Message: |
| Comment by auto [ 02/Aug/11 ] |
|
Author: {u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}Message: Add test for journal exception during large operations within db.eval |
| Comment by auto [ 01/Aug/11 ] |
|
Author: {u'login': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: always commitIfNeeded in multi-update. Fixes db.eval() |
| Comment by Mathias Stearn [ 01/Aug/11 ] |
|
I think if you add $atomic:1 (http://www.mongodb.org/display/DOCS/Atomic+Operations#AtomicOperations-ApplyingtoMultipleObjectsAtOnce) to the query it will work with journaling. The issue is that we assume journal commits will happen automatically if you are not using $atomic, but you are using db.eval() to make it atomic (really isolated in ACID-speak) without using $atomic. I can fix the code to remove this assumption, but in the meantime adding $atomic should work around this while allowing you to use journaling. Implementation note: https://github.com/mongodb/mongo/blob/master/db/ops/update.cpp#L1295-1296 |
| Comment by Dwight Merriman [ 31/Jul/11 ] |
|
we will fix bug it will be a while. in the meantime i would recommend running without journaling, or making java code that does the first case as a regular update from that code, and does what you have already above for the rest. perhaps it is only the first multi-update that is problematic (maybe 2nd one is too though not sure would have to try). |
| Comment by OLEKSII IEPISHKIN [ 31/Jul/11 ] |
|
I can not. The idea of that tool - developers add mongo queries into xml file like this <mongoChangeLog> , {$set: {className:"com.activitystream.common.dto.News"}}, false, true); <changeSet changeId="SMS-1221 rename newsGuid" author="oleksii"> , $unset: {"properties.newsGuid": 1}}, <changeSet changeId="SMS-1258" author="oleksii"> ); ); and every time application starts 1. every query is verified if it has been executed or not import com.mongodb.DB; I have an experimental impl of that dao that uses mongo shell instead of mongo java driver. DB doesn't crash in that mode but that impl has some problems so it's not ready to be used in the production code. I'm going to test with mongodb-osx-x86_64-1.9.1.tgz and will report the result. |
| Comment by Dwight Merriman [ 31/Jul/11 ] |
|
that helps i think i know what is happening then. |
| Comment by OLEKSII IEPISHKIN [ 31/Jul/11 ] |
|
Dwight, More details that could be helpful to fix the issue. db.eval(function() { , When I run that update query using mongo shell DB doesn't crash. |
| Comment by Dwight Merriman [ 31/Jul/11 ] |
|
there is a change that might fix this in 1.9 more testing needed to be sure. |