phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karanmehta93 <...@git.apache.org>
Subject [GitHub] phoenix pull request #313: PHOENIX-4799 Write cells using checkAndMutate to ...
Date Tue, 31 Jul 2018 07:11:27 GMT
Github user karanmehta93 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/313#discussion_r206415970
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -2957,6 +3010,11 @@ MutationState dropTable(String schemaName, String tableName, String
parentTableN
                     Delete linkDelete = new Delete(linkKey, clientTimeStamp);
                     tableMetaData.add(linkDelete);
                 }
    +            if (tableType == PTableType.TABLE) {
    +                // acquire a mutex on the table to prevent creating views while concurrently
    +                // dropping the base table
    +                acquiredMutex = writeCell(null, schemaName, tableName, null);
    --- End diff --
    
    Nothing is prevent even if `acquiredMutex` is false here. I think you should throw `ConcurrentTableMutationException`
here as well? You might might wanna push down that logic to `writeCell()` method?


---

Mime
View raw message