You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by karanmehta93 <gi...@git.apache.org> on 2018/08/03 21:44:15 UTC
[GitHub] phoenix pull request #313: PHOENIX-4799 Write cells using checkAndMutate to ...
Github user karanmehta93 commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/313#discussion_r207674894
--- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
@@ -2957,6 +3006,16 @@ 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);
+ if (!acquiredMutex) {
+ logger.info("Failed to acquire mutex on physical table " + physicalTableName);
--- End diff --
nit: You can push mutex related logs lines to the specific methods.
---