diff --git a/4-Infrastructure/shim/rrc_bosonic_db_buffer.py b/4-Infrastructure/shim/rrc_bosonic_db_buffer.py index 4a9a6d2d..19081ced 100644 --- a/4-Infrastructure/shim/rrc_bosonic_db_buffer.py +++ b/4-Infrastructure/shim/rrc_bosonic_db_buffer.py @@ -259,6 +259,10 @@ class AsyncDatabaseBuffer: self.conn.commit() except Exception as e: self.conn.rollback() + # Catch duplicate content hash violations and skip them cleanly as successful dedups + if e.__class__.__name__ == "UniqueViolation" and "ene_pkg_hash_idx" in str(e): + log.info("Deduplication filter triggered: record with identical content_hash already exists. Skipping.") + return raise e finally: cur.close()