prophile / jacquard

Split testing server
MIT License
7 stars 4 forks source link

Use an upgrade mechanism #69

Closed prophile closed 7 years ago

prophile commented 7 years ago

Carelessly I had allowed the format of buckets in the database to change between major versions without an upgrade mechanism. This is that upgrade mechanism.

prophile commented 7 years ago

My concerns about having an explicit migration step in place of this are twofold:

  1. It requires downtime. For the duration of the migration—short though it may be—jacquard would be inaccessible and I don't think that's acceptable over the long run. This could be solved by using this upgrade mechanism in tandem with a background migration, but that's additional complexity. This approach requires zero downtime and migrates keys as they are modified.
  2. A major sticking point here is that there is currently—by design—no way to enumerate all objects from the ODM. This is not an operation that should ever really be used in production. The ODM is designed not to rely on the ability to do it, and I'm loathe to add that requirement just to support a migration step.

Potential compromise here: an explicit version field?