-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Environment:mongos:
Wed Dec 1 16:30:37 /home/david/mongodb/latest/bin/mongos db version v1.7.2-pre-, pdfile version 4.5 starting (--help for usage)
Wed Dec 1 16:30:37 git version: 876dae7981e1ec1141fd1b155429274b83a1f99c
Wed Dec 1 16:30:37 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
mongod:
Wed Nov 10 06:55:56 db version v1.7.3-pre-, pdfile version 4.5
Wed Nov 10 06:55:56 git version: 0ca797e907c62a174a90f48954bb55c09a1ee475
Wed Nov 10 06:55:56 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
PHP Version 5.3.3
mongo driver 1.0.11mongos: Wed Dec 1 16:30:37 /home/david/mongodb/latest/bin/mongos db version v1.7.2-pre-, pdfile version 4.5 starting (--help for usage) Wed Dec 1 16:30:37 git version: 876dae7981e1ec1141fd1b155429274b83a1f99c Wed Dec 1 16:30:37 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41 mongod: Wed Nov 10 06:55:56 db version v1.7.3-pre-, pdfile version 4.5 Wed Nov 10 06:55:56 git version: 0ca797e907c62a174a90f48954bb55c09a1ee475 Wed Nov 10 06:55:56 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41 PHP Version 5.3.3 mongo driver 1.0.11
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The PHP remove() method set with safe => true is returning instantly and not outputting any count for the removed docs even though I can see the remove op in db.currentOp()
try
{
$DBMongoConn = new Mongo($config['database']['mongodb']['server']);
}
catch (Exception $e)
{
throw new Exception('MongoDB Error: connection failed: ' . $e->getMessage());
}
$collection = $sdDb->selectCollection('metrics');
try
{
$result = $collection->remove(array('accId' => $account['accountId'], 'tA' => array('$lte' => $deleteTime)), array('safe' => true));
}
catch (Exception $e)
{
die('Query failed (' . _LINE_ . '): ' . $e->getMessage() . "\n");
}
$error = $sdDb->lastError();
—
$account['accountId'] = int
$deleteTime = MongoDate
—
$error['err'] is null
$result['n'] is 0
db.currentOp()
{
"opid" : "shard1:418732718",
"active" : true,
"lockType" : "write",
"waitingForLock" : false,
"secs_running" : 124,
"op" : "remove",
"ns" : "sd.processes",
"query" : {
"accId" : 1,
"tA" :
},
"client" : "10.121.12.228:33739",
"desc" : "conn"
},