Skip to content

Commit

Permalink
Merge pull request #8822 from kaltura/Orion-15.8.0-reduceSphinxConnec…
Browse files Browse the repository at this point in the history
…tions

Orion 15.8.0 reduce sphinx connections
  • Loading branch information
yossipapi committed Oct 22, 2019
2 parents 540879a + b7e2be9 commit 639b19d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions alpha/apps/kaltura/lib/db/DbManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ protected static function getStickySessionKey()
public static function getSphinxConnection($read = true, $indexName = null)
{
KalturaLog::debug("Using index with name [$indexName]");
if($indexName && !isset(self::$config['sphinx_datasources_'.$indexName]['datasources']))
{
KalturaLog::debug("Table is not shareded will use generic index name");
$indexName = "sphinx_generic_connection";
}

if(!isset(self::$sphinxConnection[$indexName]))
{
if($indexName && isset(self::$config['sphinx_datasources_'.$indexName]['datasources']))
Expand Down

0 comments on commit 639b19d

Please sign in to comment.