Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1994#discussion_r170244941
--- Diff:
core/src/main/java/org/apache/carbondata/core/util/DeleteLoadFolders.java ---
@@ -188,8 +188,11 @@ public static boolean deleteLoadFoldersFromFileSystem(
LOGGER.info("Info: Deleted the load " +
oneLoad.getLoadName());
}
} finally {
- segmentLock.unlock();
- LOGGER.info("Info: Segment lock on segment:" +
oneLoad.getLoadName() + " is released");
+ if (segmentLock.isLocked()) {
--- End diff --
FYI:
Only unlock if we lock it successfully, otherwise this will cause failure
in windows.
---