Uploaded image for project: 'Hawkular Metrics'
  1. Hawkular Metrics
  2. HWKMETRICS-783

Schema installer should not use git hash for schema version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 0.30.0
    • Fix Version/s: 0.31.0, 0.30.4
    • Component/s: Core
    • Labels:
      None

      Description

      After applying updates, the schema installer writes the version into the sys_config table. The value of that version property is the git hash of the code when it was built. This is stored in all of the JAR MANIFEST.MF files. The server in turn at start up looks up that git hash and then queries the sys_config table. Server initialization does not complete until the two match. This is done to ensure that schema updates have been applied.

      Ruben Vargas Palma pointed out where this could be a problem. An openshift cluster could update the hawkular-metrics image without updating the schema installer as well. The server would then fail to start. To resolve the problem, we would either have to update the schema installer image or update the version in the sys_config table. Neither option is desirable.

      A better option is to not use the git commit hash. Each schema change has a version assigned to it. We should instead use that version number. The version number is stored in the cassalog scripts and in the cassalog table. The version of the latest change on disk in the cassalog scripts needs to match the latest version in cassalog.

      When I added the schema installer, I removed the server's dependency on the schema-service module and on cassalog. I think we will need to add it back though because at start up, the server will have to in one way or another look up the version in the cassalog scripts.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                john.sanda John Sanda
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: