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 Thu, 26 Jul 2018 20:45:20 GMT
Github user ankitsinghal commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/313#discussion_r205594858
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -3604,6 +3675,17 @@ public MutationState addColumn(PTable table, List<ColumnDef>
origColumnDefs,
                 }
             } finally {
                 connection.setAutoCommit(wasAutoCommit);
    +            if (!columns.isEmpty()) {
    +                for (PColumn pColumn : columns) {
    +                    PName physicalName = table.getPhysicalName();
    +                    String physicalSchemaName =
    +                            SchemaUtil.getSchemaNameFromFullName(physicalName.getString());
    +                    String physicalTableName =
    +                            SchemaUtil.getTableNameFromFullName(physicalName.getString());
    +                    deleteCell(null, physicalSchemaName, physicalTableName,
    --- End diff --
    
    @twdsilva , shouldn't you check whether you have acquired a lock(or inserted the cell
in Mutex) before deleting the lock cell, because here you might be deleting the locks acquired
by some other threads. And, You may need to do this per column I think.


---

Mime
View raw message