Skip to content

Commit

Permalink
Merge pull request #68 from talis/remove-index-issues
Browse files Browse the repository at this point in the history
Get rid of the socketTimeoutMS that's causing issues
  • Loading branch information
Chris Clarke committed Jun 25, 2015
2 parents 3ee0a04 + 769a37a commit 3c73c7e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 28 deletions.
6 changes: 2 additions & 4 deletions src/mongo/delegates/SearchDocuments.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ public function generateSearchDocumentBasedOnSpecId($specId, $resource, $context
->ensureIndex(
array('_id.type'=>1),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand All @@ -128,8 +127,7 @@ public function generateSearchDocumentBasedOnSpecId($specId, $resource, $context
->ensureIndex(
array('_impactIndex'=>1),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand Down
12 changes: 4 additions & 8 deletions src/mongo/delegates/Tables.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,7 @@ public function generateTableRows($tableType,$resource=null,$context=null,$queue
'_id.type'=>1
),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand All @@ -496,8 +495,7 @@ public function generateTableRows($tableType,$resource=null,$context=null,$queue
'_id.type'=>1
),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand All @@ -506,8 +504,7 @@ public function generateTableRows($tableType,$resource=null,$context=null,$queue
'value.'._IMPACT_INDEX=>1
),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand All @@ -519,8 +516,7 @@ public function generateTableRows($tableType,$resource=null,$context=null,$queue
$collection->ensureIndex(
$ensureIndex,
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);
}
Expand Down
12 changes: 4 additions & 8 deletions src/mongo/delegates/Views.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,7 @@ public function generateView($viewId,$resource=null,$context=null,$queueName=nul
'_id.type'=>1
),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand All @@ -420,8 +419,7 @@ public function generateView($viewId,$resource=null,$context=null,$queueName=nul
'_id.type'=>1
),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand All @@ -430,8 +428,7 @@ public function generateView($viewId,$resource=null,$context=null,$queueName=nul
'value.'._IMPACT_INDEX=>1
),
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);

Expand All @@ -443,8 +440,7 @@ public function generateView($viewId,$resource=null,$context=null,$queueName=nul
$collection->ensureIndex(
$ensureIndex,
array(
'background'=>1,
"socketTimeoutMS"=>\Tripod\Mongo\Config::getInstance()->getMongoCursorTimeout()
'background'=>1
)
);
}
Expand Down
12 changes: 4 additions & 8 deletions src/mongo/util/IndexUtils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public function ensureIndexes($reindex=false,$storeName=null,$background=true)
->ensureIndex(
$fields,
array(
"background"=>$background,
"socketTimeoutMS"=>Config::getInstance()->getMongoCursorTimeout()
"background"=>$background
)
);
}
Expand All @@ -56,8 +55,7 @@ public function ensureIndexes($reindex=false,$storeName=null,$background=true)
$fields,
array(
'name'=>$indexName,
"background"=>$background,
"socketTimeoutMS"=>Config::getInstance()->getMongoCursorTimeout()
"background"=>$background
)
);
}
Expand All @@ -84,8 +82,7 @@ public function ensureIndexes($reindex=false,$storeName=null,$background=true)
$collection->ensureIndex(
$index,
array(
"background"=>$background,
"socketTimeoutMS"=>Config::getInstance()->getMongoCursorTimeout()
"background"=>$background
)
);
}
Expand All @@ -112,8 +109,7 @@ public function ensureIndexes($reindex=false,$storeName=null,$background=true)
$collection->ensureIndex(
$index,
array(
"background"=>$background,
"socketTimeoutMS"=>Config::getInstance()->getMongoCursorTimeout()
"background"=>$background
)
);
}
Expand Down

0 comments on commit 3c73c7e

Please sign in to comment.