Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3631

Migration strategy for Cassandra mailRepository

    XMLWordPrintableJSON

Details

    Description

      Context?

      The count of Cassandra table impact overall performance.

      For people collocating several James cluster on distinct Cassandra keyspace their counts can quickly add up.

      Thus sanitizing schema transitions, in addition to clean code up also enable to keep table count low.

      Why?

      In 2018 we migrated the way to structure MailRepository, and supplied a fallback mechanism, without providing means to migrate them from the old schema to the new.

      An easy mean is to rely on reprocessing:

      • In mailetcontainer.xml define an orphan processor with just a ToRepository mailet for the processor you wishes to migrate.
      • Then trigger a full reprocessing.
      • Emails will be re-added but in v2

      Doing the upgrade with empty mail repository works too.

      People adopting distributed James after version 3.4.0 are not impacted.

      What to do from there?

      • Document commands to audit if a migration is needed
      • Document the migration process (prior to an upgrade)
      • Document that after the upgrade the table can be dropped.
      • Drop the table off James code.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              btellier Benoit Tellier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m