We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc244bb commit cef9f5fCopy full SHA for cef9f5f
synapse/storage/databases/main/purge_events.py
@@ -239,6 +239,15 @@ def _purge_history_txn(
239
240
txn.execute("SELECT event_id, should_delete FROM events_to_purge")
241
event_rows = txn.fetchall()
242
+
243
+ if len(event_rows) == 0:
244
+ logger.info("[purge] no events found to purge")
245
246
+ # For the sake of cleanliness: drop the temp table.
247
+ # This will commit the txn in sqlite, so make sure to keep this actually last.
248
+ txn.execute("DROP TABLE events_to_purge")
249
+ return
250
251
logger.info(
252
"[purge] found %i events before cutoff, of which %i can be deleted",
253
len(event_rows),
0 commit comments