Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9749

ObjectStore schema verification logic is incorrect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.1, 0.14.0, 1.0.0, 1.1.0
    • 1.2.0
    • Metastore

    Description

      Specifically when the versions are the same, we still try and record a new version:

            // metastore schema version is different than Hive distribution needs
            if (strictValidation) {
              if (!schemaVer.equalsIgnoreCase(MetaStoreSchemaInfo.getHiveSchemaVersion())) {
                throw new MetaException("Hive Schema version "
                    + MetaStoreSchemaInfo.getHiveSchemaVersion() +
                    " does not match metastore's schema version " + schemaVer +
                    " Metastore is not upgraded or corrupt");
              } else {
                LOG.warn("Metastore version was " + schemaVer + " " +
                    HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION.toString() +
                    " is not enabled so recording the new schema version " +
                    MetaStoreSchemaInfo.getHiveSchemaVersion());
                setMetaStoreSchemaVersion(MetaStoreSchemaInfo.getHiveSchemaVersion(),
                    "Set by MetaStore");
              }
      

      additionally an ObjectStore object is created for all clients. As such we'll also make the verification complete flag static.

      Attachments

        1. HIVE-9749.patch
          11 kB
          Brock Noland
        2. HIVE-9749.patch
          2 kB
          Brock Noland

        Activity

          People

            brocknoland Brock Noland
            brocknoland Brock Noland
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: