Issues with MapReduce running on two databases

16 views
Skip to first unread message

Christoph Pilka

unread,
Feb 10, 2015, 7:00:13 AM2/10/15
to mongo...@googlegroups.com
Hi folks,

I posted same question right now @mongo-users, but for me it seems to be very code internal, so I hope it's a wise decision to ask here as well. Please don't complain about cross-posting :)

I'm running a MapReduce job that takes data from few collections from database db_one and reduces the results into few collections in database db_two. So basically two databases are involved. My issue is that it triggers a lock for these both databases at the same time. And all ends up in a an error message like this:

Sat Feb 7 16:24:07.196 [conn20051] Assertion: 16099:internal error tried to lock two databases at the same time. old:db_one new:db_two

0xb3b123 0x9e6753 0x9e67ec 0x8a1ac6 0x8a1dea 0x8a1eb1 0x8b82e5 0x9d104b 0x9d11d6 0x9d7663 0x978d59 0x97a4e4 0x97b1ba 0x8e7b15 0x8ea69b 0x90970c 0x75a67b 0x84f75c 0x7f1b9623fb50 0x7f1b953cc20d 
 /usr/local/bin/mongod(_ZN5mongo15printStackTraceERSo+0x23) [0xb3b123]
 /usr/local/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x93) [0x9e6753]
 /usr/local/bin/mongod() [0x9e67ec]
 /usr/local/bin/mongod(_ZN5mongo4Lock6DBRead9lockOtherERKNS_10StringDataERKSs+0x246) [0x8a1ac6]
 /usr/local/bin/mongod(_ZN5mongo4Lock6DBRead6lockDBERKSsS3_+0xca) [0x8a1dea]
 /usr/local/bin/mongod(_ZN5mongo4Lock6DBReadC2ERKNS_10StringDataERKSs+0x61) [0x8a1eb1]
 /usr/local/bin/mongod(_ZN5mongo6Client11ReadContextC1ERKNS_10StringDataERKSs+0x25) [0x8b82e5]
 /usr/local/bin/mongod(_ZN5mongo2mr5State14reduceInMemoryEv+0x1db) [0x9d104b]
 /usr/local/bin/mongod(_ZN5mongo2mr5State9checkSizeEv+0x56) [0x9d11d6]
 /usr/local/bin/mongod(_ZN5mongo2mr16MapReduceCommand3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x563) [0x9d7663]
 /usr/local/bin/mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x39) [0x978d59]
 /usr/local/bin/mongod(_ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x8c4) [0x97a4e4]
 /usr/local/bin/mongod(_ZN5mongo12_runCommandsEPKcRKNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x3aa) [0x97b1ba]
 /usr/local/bin/mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x35) [0x8e7b15]
 /usr/local/bin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x6fb) [0x8ea69b]
 /usr/local/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x6bc) [0x90970c]
 /usr/local/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x8b) [0x75a67b]
 /usr/local/bin/mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x3dc) [0x84f75c]
 /lib/x86_64-linux-gnu/libpthread.so.0(+0x6b50) [0x7f1b9623fb50]
 /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f1b953cc20d]
Sat Feb  7 16:24:07.216 [conn20051] CMD: drop db_two.tmp.mr.test_collection_13
Sat Feb  7 16:24:07.317 [conn20051] CMD: drop db_two.tmp.mr.test_collection_13_inc
Sat Feb  7 16:24:07.328 [conn20051] CMD: drop db_two.tmp.mr.test_collection_13
Sat Feb  7 16:24:07.329 [conn20051] CMD: drop db_two.tmp.mr.test_collection_13_inc

Does anyone here have a hint what's going wrong there? The MapReduce jobs don't use any MongoDB related functions. Everything is provided either via "scope" or as "document" from M/R.

I appreciate any help,
Chris

Asya Kamsky

unread,
Feb 13, 2015, 2:00:21 PM2/13/15
to mongo...@googlegroups.com
Chris,

Are you running this with regular MongoDB? Which exact version/build?

I'm asking this because an absolutely identical question was asked on
the TokuMX mailing list, and as you might understand, the two
codebases diverge quite a bit.

Asya
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mongodb-dev...@googlegroups.com.
> To post to this group, send email to mongo...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mongodb-dev.
> For more options, visit https://groups.google.com/d/optout.



--
{ "name" : "Asya Kamsky",
"place" : [ "New York", "Palo Alto", "Everywhere else" ],
"email" : "as...@mongodb.com",
"blog" : "http://www.askasya.com/",
"twitter": "@asya999" }
Reply all
Reply to author
Forward
0 new messages