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

t114 dont replicate compiled sieve bytecode #13

Merged

Conversation

elliefm
Copy link
Contributor

@elliefm elliefm commented Aug 1, 2016

(From an old phabricator task: https://git.cyrus.foundation/T114)

This stops replication of binary sieve bytecode files. Instead, bytecode files are compiled by the replica on upload of the plain text script, or on activation via sync protocol. Attempts to replicate bytecode files are silently ignored.

A new sync protocol error is introduced, IMAP_SYNC_BADSIEVE, which will result if a replicated sieve script fails to parse/compile. This makes it important to ensure your master and replica servers have the same sieve extensions enabled.

Also, lmtpd now recompiles sieve bytecode files (if missing or stale) on demand. So a temporary parse/compile failure during replication is somewhat self-healing if the sieve script needs to actually be invoked later.

If an old master (without this change) syncs to a new replica (with this change):

  • master will send script files => replica will compile them to bytecode
  • master will send bytecode files => replica will ignore them
  • master will activate bytecode file => replica will recompile it (if missing or stale) and activate it

If a new master (with this change) syncs to an old replica (without this change):

  • master will send script files => replica will accept them
  • master will not send bytecode files => bytecode files on replica will be missing or stale
  • master will activate bytecode file => replica will create symlink to missing or stale bytecode file
  • if the replica needs to be brought into active service, something like tools/masssievec should be run first to ensure required bytecode files are present and current

If a new master (with this change) syncs to a new replica (with this change):

  • master will send script files => replica will compile them to bytecode
  • master will not send bytecode files => replica doesn't need them anyway
  • master will activate bytecode file => replica will recompile it (if missing or stale) and activate it

This is somewhat invasive, so making it a pull request rather than just pushing it up.

@elliefm elliefm force-pushed the v30/t114-dont-replicate-compiled-sieve branch from c101547 to 4b4ecc6 Compare August 17, 2016 02:52
@elliefm
Copy link
Contributor Author

elliefm commented Aug 19, 2016

@brong I'm starting to get blocked on this -- I've got a bunch of other changes ready to go (and more in progress) that will be conflict hell if I push them first.

dilyanpalauzov added a commit to dilyanpalauzov/cyrus-imapd that referenced this pull request Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 affects 3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants