Skip to content

Use partitioned reply_key format for sent_notifications

What does this MR do and why?

Use partitioned reply_key format for sent_notifications

Encode PK information in reply key for sent_notifications so we can efficiently find records in the DB once the table is partitioned. Change behind a feature flag.

The new version of the code will also be efficient on the old original table (not partitioned) as we also find by reply_key as we did before.

How to set up and validate locally

  1. Enable the feature flag in a Rails console with Feature.enable(:sent_notifications_partitioned_reply_key)
  2. Ping another user in any note (MR, issue, epic). This will send out a notification with the new reply_key
  3. In your local GDK go to http://gdk.test:3000/rails/letter_opener, in there find the latest email for your note. In there, you'll find an unsubscribe link on the bottom. Click it and is should unsubscribe you from the issue or MR where you created the note.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #514591

Edited by Mario Celi

Merge request reports

Loading