update_rss_feed: juxtapose pdo and ORM commit on timestamp update

If for whatever reason $pdo holds a DDL lock on ttrss_entries, it could
block ORM's save, leading to a deadlock. To work around this, call
$pdo->commit() before ORM::for_table()->save().
This commit is contained in:
Richard Tollerton 2022-01-13 23:39:49 -06:00
parent 420782418d
commit aaccf89501
1 changed files with 2 additions and 2 deletions

View File

@ -786,13 +786,13 @@ class RSSUtils {
// dupes when the entry gets purged and reinserted again e.g.
// in the case of SLOW SLOW OMG SLOW updating feeds
$pdo->commit();
$entry_obj = ORM::for_table('ttrss_entries')
->find_one($base_entry_id)
->set('date_updated', Db::NOW())
->save();
$pdo->commit();
continue;
}