phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4523) phoenix.schema.isNamespaceMappingEnabled problem
Date Thu, 11 Jan 2018 08:24:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-4523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16321851#comment-16321851
] 

ASF GitHub Bot commented on PHOENIX-4523:
-----------------------------------------

Github user fpompermaier commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/288#discussion_r160888052
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
---
    @@ -2543,16 +2543,15 @@ public Void call() throws Exception {
             }
         }
     
    -    void createSysMutexTable(HBaseAdmin admin, ReadOnlyProps props) throws IOException,
SQLException {
    +    void createSysMutexTableIfNotExists(HBaseAdmin admin, ReadOnlyProps props) throws
IOException, SQLException {
             try {
    -            final TableName mutexTableName = SchemaUtil.getPhysicalTableName(
    -                PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME, props);
    -            List<TableName> systemTables = getSystemTableNames(admin);
    -            if (systemTables.contains(mutexTableName) || admin.tableExists( TableName.valueOf(
    -                PhoenixDatabaseMetaData.SYSTEM_SCHEMA_NAME,PhoenixDatabaseMetaData.SYSTEM_MUTEX_TABLE_NAME)))
{
    +            if(admin.tableExists(PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME) || admin.tableExists(TableName.valueOf(
    --- End diff --
    
    why not just leave if (admin.tableExists(mutexTableName)) ?


> phoenix.schema.isNamespaceMappingEnabled problem
> ------------------------------------------------
>
>                 Key: PHOENIX-4523
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4523
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.13.1
>            Reporter: Flavio Pompermaier
>            Assignee: Karan Mehta
>         Attachments: PHOENIX-4523.001.patch
>
>
> I'm using Phoenix 4.13 for CDH 5.11.2 parcel and enabling schemas made my code unusable.
> I think that this is not a bug of the CDH release, but of all 4.13.x releases.
> I have many parallel Phoenix connections and I always get the following exception:
> {code:java}
> Caused by: java.sql.SQLException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.TableExistsException):
SYSTEM:MUTEX
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2492)
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2384)
> 	at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
> 	at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2384)
> 	at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
> 	at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
> 	at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:664)
> 	at java.sql.DriverManager.getConnection(DriverManager.java:270)
> {code}
> This is caused by the fact that all the times the SYSTEM tables are recreated, and this
cannot be done simultaneously.
> Trying to debug the issue I found that in ConnectionQueryServicesImpl.createSysMutexTable()
the call to getSystemTableNames() always return an empty array and the SYSTEM:MUTEX  table
is always recreated.
> This because getSystemTableNames() doesn't consider the case when system tables have
namespace enabled. Right now that method tries to get all tables starting with *SYSTEM.\**,
while it should try to get the list of *SYSTEM:\** tables..
> I hope this could get fixed very soon,
> Flavio



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message