james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc DUZAN (JIRA)" <server-...@james.apache.org>
Subject [jira] [Created] (JAMES-2083) Write a Cassandra migration task for MessageDao changes
Date Mon, 03 Jul 2017 06:18:00 GMT
Luc DUZAN created JAMES-2083:
--------------------------------

             Summary: Write a Cassandra migration task for MessageDao changes
                 Key: JAMES-2083
                 URL: https://issues.apache.org/jira/browse/JAMES-2083
             Project: James Server
          Issue Type: Improvement
          Components: cassandra
            Reporter: Luc DUZAN


We have two version of the MessageDAO, and we want to ensure we always read the latest one.
Thus we need to implement migration logic.

Implement Database version tracking in Cassandra-backends. You will store the current state
of the database in a table (an int). (And the associated DAO)
You will implement a static version in the code with expected minimal database version, and
current maximal available version. Upon James start, you will:
 - Throw an error if the database schema version is too low
 - Log a warning if the database version can be upgraded
 - Do nothing when DB version is the latest the code can handle.

(Note: we can assume the version of the DB is current version when entry is missing. Special
care would be taken when deploying on OP.LNG.COM)

You will write a migration (in mailbox/cassandra/):
 - Requires DB in V1
 - When fully run, will write DB state as V2
 - Read from CassandraMessageDaoV1 and write in CassandraDaoV2, then delete entry in CassandraMessageDaoV1
 - Track progress by logs on each message (easy task monitoring through Kibana



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message