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

Add sync_support for delayed delete mode (master) #4340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kanarip
Copy link

@kanarip kanarip commented Dec 1, 2022

In sync_apply_unmailbox() and sync_apply_unuser(), the call to mboxlist_deletemailbox() is currently independent of whether delete_mode: delayed is configured, creating a risk of data-loss.

Under certain circumstances, in an A<->B two-way replication scenario for high availability, where B may have failed to synchronize a mailbox user/john to A, and A has a user/john mailbox created, the initial A->B "mailbox" replication is refused, but A will promote the synchronization to become of the "user" level, which B appears to accept; it'd remove the existing user/john mailbox, including the file-system hierarchy, resulting in (effectively) data-loss, before recreating the user/john mailbox.

From PR #4337, with @elliefm requesting the PR is rebased against master.

@kanarip
Copy link
Author

kanarip commented Dec 1, 2022

I believe I could use some help;

In perl/imap/Cyrus/AccountSync.pm#L240, we would appear to call Cyrus::Mbname->new_intname("DELETED.user.newuser.63885DC8"), which appears to fail to set $self->{is_deleted}? But perl/imap/Cyrus/Mbname.pm#L29 appears to me should -- what am I missing?

@elliefm elliefm added the backport-to-3.6 for PRs that are to be backported to 3.6 label Dec 1, 2022
sync_apply_unuser()

Signed-off-by: Jeroen van Meeuwen (Apheleia IT) <[email protected]>
@elliefm elliefm self-assigned this Oct 8, 2024
@elliefm elliefm removed the backport-to-3.6 for PRs that are to be backported to 3.6 label Oct 8, 2024
@elliefm
Copy link
Contributor

elliefm commented Oct 8, 2024

@kanarip Your most recent comment makes me think this is incomplete, but I don't know the answer to your question. The changes apply cleanly, but they don't pass our tests. Do you expect to keep working on this? If not I'll close it.

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.

2 participants