Github user ChinmaySKulkarni commented on the issue: https://github.com/apache/phoenix/pull/295 @JamesRTaylor I'm trying to check if we can move the logic in the try block in init to _ensureTableCreated_ and there seem to be a couple of hurdles while doing so. We don't have access to the DO_NOT_UPGRADE property which is declared to be private inside UpgradeUtil.java and we can't access its getter method 'isNoUpgradeSet' from _ensureTableCreated_ because we have properties of type 'ReadOnlyProps', not 'Properties' (I couldn't find any converter methods between these instances). We need this property to decide whether or not to set _setUpgradeRequired_ to true. Also, we call _ensureSystemTablesMigratedToSystemNamespace_ inside this try block in init and also have a check which basically throws an InconsistentNamespaceMappingProperties exception if phoenix.schema.mapSystemTablesToNamespace is false and SYSTEM:CATALOG still exists. Now if we move all this logic to _ensureTableCreated_, we would have to add extra checks inside this to make sure whether _ensureTableCreated_ is called for SYSTEM.CATALOG or SYSTEM:CATALOG. Because of this, I don't think it's possible to move all this to _ensureTableCreated_.
---