akkadotnet / Akka.Persistence.Sql

Linq2Db implementation of Akka.Persistence.Sql. Common implementation for SQL Server, Sqlite, Postgres, Oracle, and MySql.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Store Tags in separate table rather than inline

to11mtm opened this issue · comments

commented

Is your feature request related to a problem? Please describe.

Users would like the ability to use a separate table for tags with SQL Persistence, as described in akkadotnet/akka.net#5296 .

Additionally, Existing users of Akka.Persistence.Linq2Db would like to ensure they continue to maintain fast read and write performance from their existing journals.

It would be extra great, if we could provide users a way to migrate with zero downtime (if more effort.)

Describe the solution you'd like

We can leverage Linq2Db and Akka.Persistence.Linq2Db's pipeline to provide a solution.

By providing 3 Read and Write modes, we can allow for a 'seamless' deployment, ideal state would be:

  • Writers and readers are in 'old' mode.
  • Deploy code for writers and readers in 'migration' mode. Writers will write both the comma separated tags and to the tag table, Readers will check for tags from both.
  • Run utility or DB Script to put old tags into the tag table.
  • Deploy code for writers and readers in 'new' mode.
  • DBAs can clear out tag column if needed.