[PATCH 0/5] Prevent database error logs on duplicate mail

Jeremy Kerr jk at ozlabs.org
Thu Apr 16 11:29:23 AEST 2020


On patchwork.ozlabs.org, we see a lot of noise in the postgres logs, due
to INSERTs with duplicate values for (project,msgid) keys. Patchwork's
strategy for catching the resulting IntegrityError means that each of
these is logged.

Instead, this change moves to an atomic select -> insert for the Patch,
Comment and Coverletter parsing.

Jeremy Kerr (5):
  tests: Add duplicate mail test
  tests: ensure we don't see database errors during duplicate insert
  parser: prevent IntegrityErrors
  parser: don't trigger database IntegrityErrors on duplicate comments
  parser: don't trigger database IntegrityErrors on duplicate
    coverletters

 patchwork/parser.py            | 20 ++++++-----
 patchwork/tests/test_parser.py | 64 ++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 9 deletions(-)

-- 
2.17.1



More information about the Patchwork mailing list