-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
Environment:Linux
-
Linux
Running the following PHP script
<?php
$userId = '4ab78de83395004d26791dd8';
$connectionParams = array('persist' => '1', 'replicaSet' => true);
$dbCx = new Mongo('127.0.0.1:27017,127.0.0.1:27018', $connectionParams);
$testCollection = $dbCx->selectCollection('dbName','testCollection');
echo "now count is " . print_r($testCollection->count(
array(
'userId' =>$userId,
// 'origin' => 'origin',
// 'action' => 'action'
)
), true) . "\n";
echo "now count is " . print_r($testCollection->count(
array(
'userId' => $userId,
'origin' => 'origin',
'action' => 'action'
)
), true) . "\n";
?>
I get the following message in the mongo log:
Assertion failure _c.get() db/query.cpp 433
0x5512de 0x562ce1 0x6529d0 0x7a2593 0x7a2a5b 0x797602 0x79a91b 0x79d044 0x79dbe7 0x645ec1 0x7f2a7d 0x7dc5f0 0x7ddb21 0x645565 0x64addc 0x757f15 0x75a440 0x8a617e 0x8b92d0 0x7f11831c4971
/opt/mongodb/bin/mongod(_ZN5mongo12sayDbContextEPKc+0xae) [0x5512de]
/opt/mongodb/bin/mongod(_ZN5mongo8assertedEPKcS1_j+0x111) [0x562ce1]
/opt/mongodb/bin/mongod(_ZN5mongo7CountOp8nscannedEv+0x40) [0x6529d0]
/opt/mongodb/bin/mongod(ZSt11push_heapIN9gnu_cxx17normal_iteratorIPN5mongo8OpHolderESt6vectorIS3_SaIS3_EEEElS3_St4lessIS3_EEvT_T0_SC_T1_T2+0xb3) [0x7a2593]
/opt/mongodb/bin/mongod(ZNSt14priority_queueIN5mongo8OpHolderESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushERKS1+0xab) [0x7a2a5b]
/opt/mongodb/bin/mongod(_ZN5mongo12QueryPlanSet6Runner3runEv+0xad2) [0x797602]
/opt/mongodb/bin/mongod(_ZN5mongo12QueryPlanSet5runOpERNS_7QueryOpE+0x5b) [0x79a91b]
/opt/mongodb/bin/mongod(_ZN5mongo16MultiPlanScanner9runOpOnceERNS_7QueryOpE+0x64) [0x79d044]
/opt/mongodb/bin/mongod(_ZN5mongo16MultiPlanScanner5runOpERNS_7QueryOpE+0x17) [0x79dbe7]
/opt/mongodb/bin/mongod(_ZN5mongo8runCountEPKcRKNS_7BSONObjERSs+0x3c1) [0x645ec1]
/opt/mongodb/bin/mongod(_ZN5mongo8CmdCount3runERKSsRNS_7BSONObjERSsRNS_14BSONObjBuilderEb+0xad) [0x7f2a7d]
/opt/mongodb/bin/mongod(_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x9a0) [0x7dc5f0]
/opt/mongodb/bin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_10BufBuilderERNS_14BSONObjBuilderEbi+0x831) [0x7ddb21]
/opt/mongodb/bin/mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_10BufBuilderERNS_14BSONObjBuilderEbi+0x35) [0x645565]
/opt/mongodb/bin/mongod(ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1+0x31ac) [0x64addc]
/opt/mongodb/bin/mongod() [0x757f15]
/opt/mongodb/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8SockAddrE+0x5b0) [0x75a440]
/opt/mongodb/bin/mongod(_ZN5mongo10connThreadEPNS_13MessagingPortE+0x21e) [0x8a617e]
/opt/mongodb/bin/mongod(thread_proxy+0x80) [0x8b92d0]
/lib/libpthread.so.0(+0x7971) [0x7f11831c4971]
MongoDB runs with the notablescan option and there are indexes in the testCollection on userId and requestTime