Ticket #1484074 (closed Bugs: fixed)

Opened 2 years ago

Last modified 20 months ago

Large cache miss ratio due to duplicate UIDs

Reported by: patrys Owned by:
Priority: 5 Milestone: 0.1-rc1
Component: Database Version: 0.1-beta2
Severity: critical Keywords:
Cc:

Description

Roundcube uses a pair of (uid, cache_key) as the uniqueness enforcer in the messages table. Some systems (exim + courier-imap here) do not guarantee global UID uniqueness, UIDs are only unique per mailbox.

Since RC checks for the user_id match anyway, I was able to temporarily fix it (large numbers of DB Error: Already exists) by adding user_id as the third column to the UNIQUE key.

Change History

Changed 23 months ago by kajtzu@…

This seems to happen with cyrus-imapd as well and svn-trunk.

Changed 21 months ago by moc

  • version changed from 0.1-rc1 to 0.1-beta2
  • severity changed from normal to critical
  • milestone set to 0.1-rc1

I have the same problem with Binc IMAP. A possible fix is to add the user_id field to the UNIQUE key for the messages table.

Here is the patch for PostgreSQL: ALTER TABLE "messages" ADD UNIQUE (user_id, cache_key, uid);

Changed 20 months ago by thomasb

  • status changed from new to closed
  • resolution set to fixed

Fixed in Trunk (r509)

Note: See TracTickets for help on using tickets.