phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ankitsinghal <...@git.apache.org>
Subject [GitHub] phoenix pull request #313: PHOENIX-4799 Write cells using checkAndMutate to ...
Date Wed, 01 Aug 2018 02:13:59 GMT
Github user ankitsinghal commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/313#discussion_r206735726
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/QueryConstants.java ---
    @@ -355,5 +355,19 @@
     			+ "," + COLUMN_NAME + "," + COLUMN_FAMILY + "))\n" + HConstants.VERSIONS + "=%s,\n"
     			+ HColumnDescriptor.KEEP_DELETED_CELLS + "=%s,\n" + PhoenixDatabaseMetaData.TRANSACTIONAL
+ "="
     			+ Boolean.FALSE;
    +	
    +	 public static final String CREATE_MUTEX_METADTA =
    +	            "CREATE IMMUTABLE TABLE " + SYSTEM_CATALOG_SCHEMA + ".\"" + SYSTEM_MUTEX_TABLE_NAME
+ "\"(\n" +
    +	            // Pk columns
    +	            TENANT_ID + " VARCHAR NULL," +
    +	            TABLE_SCHEM + " VARCHAR NULL," +
    +	            TABLE_NAME + " VARCHAR NOT NULL," +
    +	            COLUMN_NAME + " VARCHAR NULL," + // null for table row
    +	            COLUMN_FAMILY + " VARCHAR NULL " + // using for CF to uniqueness for columns
    +	            "CONSTRAINT " + SYSTEM_TABLE_PK_NAME + " PRIMARY KEY (" + TENANT_ID + ","
    +	            + TABLE_SCHEM + "," + TABLE_NAME + "," + COLUMN_NAME + "," + COLUMN_FAMILY
+ "))\n" +
    +	            HConstants.VERSIONS + "=%s,\n" +
    +	            HColumnDescriptor.KEEP_DELETED_CELLS + "=%s,\n" +
    +	            PhoenixDatabaseMetaData.TRANSACTIONAL + "=" + Boolean.FALSE;
    --- End diff --
    
    Why there is a need of creating a Phoenix managed table for mutex? 
    And also API in QueryServices.writeMutexCell(byte[] rowKey) and deleteMutexCell(byte[]
rowKey) don't enforce the schema of the table will be followed. 



---

Mime
View raw message