Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orion 15.6.0 sphinx populate #8726

Merged
merged 2 commits into from Aug 26, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -70,7 +70,7 @@ public static function retrieveByLastId(array $servers, $gap = 0, $limit = 1000,
$types = array($type);
$criteria->add(SphinxLogPeer::TYPE, $types, Criteria::IN);
$criteria->add(SphinxLogPeer::CREATED_AT, time() -1, Criteria::LESS_EQUAL);
$criteria->addAscendingOrderByColumn(SphinxLogPeer::ID);
$criteria->setLimit($limit);
@@ -73,6 +73,7 @@ function filter($i) {
$serverLastLogs = SphinxLogServerPeer::retrieveByServer($sphinxServer, $sphinxReadConn);
$lastLogs = array();
$handledRecords = array();
$sphinxRtTables = array();
foreach($serverLastLogs as $serverLastLog)
{
@@ -95,7 +96,10 @@ function filter($i) {
try
{
$sphinxCon = DbManager::createSphinxConnection($sphinxServer,$sphinxPort);
$sphinxRtTables = getSphinxRtTables($sphinxCon);
if(!count($sphinxRtTables))
{
$sphinxRtTables = getSphinxRtTables($sphinxCon);
}
KalturaLog::log("sphinxServer [$sphinxServer], running rt index names [" . implode(",", $sphinxRtTables) . "]");
}
catch(Exception $e)
@@ -112,7 +116,7 @@ function filter($i) {
$executedServerId = $sphinxLog->getExecutedServerId();
$sphinxLogId = $sphinxLog->getId();
$sphinxLogIndexName = $sphinxLog->getIndexName();
if($isSharded && preg_match('~[0-9]~', $sphinxLogIndexName) == 0 && $splitIndexSettings && isset($splitIndexSettings[$sphinxLog->getObjectType()]))
if($isSharded && preg_match('~[0-9]~', $sphinxLogIndexName) == 0 && $splitIndexSettings && isset($splitIndexSettings[$sphinxLog->getObjectType()]))
{
$splitFactor = $splitIndexSettings[$sphinxLog->getObjectType()];
$sphinxLogIndexName = $sphinxLogIndexName . "_" . ($sphinxLog->getPartnerId()/$splitFactor)%$splitFactor;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.