[ https://issues.apache.org/jira/browse/PHOENIX-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424590#comment-16424590 ]
ASF GitHub Bot commented on PHOENIX-4579: ----------------------------------------- Github user ChinmaySKulkarni commented on a diff in the pull request: https://github.com/apache/phoenix/pull/295#discussion_r178961071 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java --- @@ -2643,6 +2661,26 @@ public void upgradeSystemTables(final String url, final Properties props) throws metaConnection.setRunningUpgrade(true); try { metaConnection.createStatement().executeUpdate(QueryConstants.CREATE_TABLE_METADATA); + + // HBase Namespace SYSTEM is created by {@link ensureSystemTablesMigratedToSystemNamespace(ReadOnlyProps)} method + // This statement will create its entry in SYSCAT table, so that GRANT/REVOKE commands can work + // with SYSTEM Namespace. (See PHOENIX-4227 https://issues.apache.org/jira/browse/PHOENIX-4227) + if (SchemaUtil.isNamespaceMappingEnabled(PTableType.SYSTEM, + ConnectionQueryServicesImpl.this.getProps())) { --- End diff -- @JamesRTaylor Makes sense. Note that we don't **already** have the SYSMUTEX lock at this point (referring to your earlier comment). This is in fact necessary to avoid an _UpgradeInProgressException_ from _ensureSystemTablesMigratedToSystemNamespace_ since we try to acquire the SYSMUTEX lock inside here as well. So, moving _ensureSystemTablesMigratedToSystemNamespace_ to this place shouldn't lead to any problems. > Add a config to conditionally create Phoenix meta tables on first client > connection > ----------------------------------------------------------------------------------- > > Key: PHOENIX-4579 > URL: https://issues.apache.org/jira/browse/PHOENIX-4579 > Project: Phoenix > Issue Type: New Feature > Reporter: Mujtaba Chohan > Assignee: Chinmay Kulkarni > Priority: Major > Attachments: PHOENIX-4579.patch > > > Currently we create/modify Phoenix meta tables on first client connection. > Adding a property to make it configurable (with default true as it is > currently implemented). > With this property set to false, it will avoid lockstep upgrade requirement > for all clients when changing meta properties using PHOENIX-4575 as this > property can be flipped back on once all the clients are upgraded. -- This message was sent by Atlassian JIRA (v7.6.3#76005)