Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6207

RDBDocumentStore: allow schema evolution part 2: record schema version when updating/inserting rows

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0, 1.8.0
    • documentmk, rdbmk
    • None

    Description

      Currently, new/extra columns get reported on startup but then are ignored. This allows evolving the schema without immediately breaking existing installs. However, we won't know whether a value in a new column was put there deliberately or just wasn't updated properly by old code.

      Idea:

      • add a new "VERSION" column
      • when inserting/updating rows, record the DB schema version understood by the code doing the update

      Advantages:

      • allows relatively easy check what versions of code are writing to the DB
      • inexpensive
      • helps finding rows that need a migration step

      Disadvantage:

      • the row itself will be unreliably until all instances connecting to the DB maintain it

      Attachments

        1. OAK-6207.diff
          27 kB
          Julian Reschke
        2. OAK-6207.diff
          10 kB
          Julian Reschke
        3. OAK-6207.diff
          6 kB
          Julian Reschke

        Issue Links

          Activity

            People

              reschke Julian Reschke
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: