Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conversations issues #5181

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Fix conversations issues #5181

wants to merge 5 commits into from

Conversation

brong
Copy link
Member

@brong brong commented Dec 20, 2024

There's two issues here:

  1. basecid inconsistency causing TEMP/REAL mismatch

  2. poor inbox detection on user rename causing bigger issues. The second one is ALSO a known Fastmail issue on user rename, such that we do a full conversations rebuild after renaming. This will fix that.

The reason these weren't detected earlier is that ctl_conversationsdb -A ONLY works on databases which support fetchnext, which skiplist doesn't, so we didn't notice these until switching to make twoskip the default.

Copy link
Contributor

@ksmurchison ksmurchison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes make sense, but Replication.full_rename failed.
Don't know if this is an issue with the test or the actual code

imap/imapd.c Show resolved Hide resolved
imap/sync_support.c Show resolved Hide resolved
This matches the logic in mailboxes.c, and makes audit tests pass
This stops us writing to the wrong DB when copying the INBOX,
which fixes a long standing bug with UUID mailboxes and renames.

This fixes both the imapd rename, and the replication rename
codepaths.
This just makes it easier to read
@brong
Copy link
Member Author

brong commented Dec 23, 2024

@wolfsage both your comments are fixed in 75509c3

@ksmurchison - the fixes above also fixed the Replication test! Yep, looks like it was a bug before.

int r2 = mboxlist_update_full(olddestmbentry, /*localonly*/1, /*silent*/1);
if (r2)
xsyslog(LOG_ERR, "IOERROR: replacing old destination tombstone after rename error",
"mboxname=<%s>, error=<%s>", olddestmbentry->name, error_message(r));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all four cases here should we also be logging error_message(r2) so we know why the cleanup failed?

"mboxname=<%s>, error=<%s>, cleanuperror=<%s>", oldestmbentry->name, error_message(r), error_message(r2));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants