Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1153#discussion_r126397287
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
---
@@ -860,17 +852,19 @@ case class CarbonDropTableCommand(ifExistsSet:
Boolean,
.dropTable(storePath, identifier)(sparkSession)
LOGGER.audit(s"Deleted table [$tableName] under database [$dbName]")
} finally {
- if (carbonLock != null && isLocked) {
- if (carbonLock.unlock()) {
+ LOGGER.audit(s"Dropping table $dbName.$tableName failed as the Table
is locked")
+ if (carbonLocks.nonEmpty) {
+ val unlocked = carbonLocks.map(_.unlock())
+ if (unlocked.reduce(_ && _)) {
logInfo("Table MetaData Unlocked Successfully after dropping the
table")
--- End diff --
This state can come after acquiring lock and failure also.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---