nextcloud / nextcloud/mail

Make use of the new UniqueConstraintViolationException for Tagging

Open
#5,176 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop blocked enhancement
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Feature Request

We're currently checking every incoming IMAP tag against the DB to see if it exists. The new UniqueConstraintViolationException will do the work for us, but is only supported from NC20 onwards.

Summary

When we drop support for NC19, we can change the TagMapper::tagMessage and possibly some other methods to check for a unique constraint violation, which will speed up the tag creation process.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate TagMapper::tagMessage and review how incoming IMAP tags are checked against the database. When support for NC19 is dropped, trace the existing tag-creation path and determine whether other methods use the same check; done means using UniqueConstraintViolationException on NC20 and later without the pre-check.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.