From aaccf89501af9734e86791e51cdc0063d8d0daec Mon Sep 17 00:00:00 2001 From: Richard Tollerton Date: Thu, 13 Jan 2022 23:39:49 -0600 Subject: [PATCH] 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(). --- classes/rssutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/rssutils.php b/classes/rssutils.php index e826a32f8..8af544a12 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -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; }