Pluf Framework

Pluf Framework Commit Details


Date:2009-02-25 07:02:32 (15 years 9 months ago)
Author:Loic d'Anterroches
Branch:develop, master
Commit:e3fc921906e8ae5bf918f96be5a020c8899e90b3
Parents: e9c9ebb29dfbd3174d5c80d49b6b06a1094742cf
Message:Fixed to be more resilient in case of concurrent indexing.

Changes:

File differences

src/Pluf/Search.php
176176
177177
178178
179
180
179
180
181
182
183
184
185
186
187
188
189
190
181191
182192
183193
if ($ids[$i] === null) {
$word = new Pluf_Search_Word();
$word->word = $words_flat[$i];
$word->create();
$ids[$i] = $word->id;
try {
$word->create();
$ids[$i] = $word->id;
} catch (Exception $e) {
// most likely concurrent addition of a word, try
// to read it.
$_ids = self::getWordIds(array($words_flat[$i]));
if ($_ids[0] !== null) {
// if we miss it here, just forget about it
$ids[$i] = $_ids[0];
}
}
$new_words++;
}
if (isset($done[$ids[$i]])) {

Archive Download the corresponding diff file

Branches

Tags

Number of commits:
Page rendered in 0.05727s using 13 queries.