Skip to content

Commit

Permalink
[CARBONDATA-2298]Delete segment lock files before update metadata
Browse files Browse the repository at this point in the history
If there are some COMPACTED segments and their last modified time is within one hour, the segment lock files deletion operation will not be executed.

This closes #2124
  • Loading branch information
zzcclp authored and jackylk committed Apr 2, 2018
1 parent 0992b3b commit 6374d36
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,8 @@ public static void deleteLoadsAndUpdateMetadata(
CarbonTable carbonTable,
boolean isForceDeletion,
List<PartitionSpec> partitionSpecs) throws IOException {
// delete the expired segment lock files
CarbonLockUtil.deleteExpiredSegmentLockFiles(carbonTable);
if (isLoadDeletionRequired(carbonTable.getMetadataPath())) {
AbsoluteTableIdentifier identifier = carbonTable.getAbsoluteTableIdentifier();
ReturnTuple tuple = isUpdationRequired(isForceDeletion, carbonTable, identifier);
Expand Down Expand Up @@ -963,8 +965,6 @@ public static void deleteLoadsAndUpdateMetadata(
}
}
}
// delete the expired segment lock files
CarbonLockUtil.deleteExpiredSegmentLockFiles(carbonTable);
}

/**
Expand Down

0 comments on commit 6374d36

Please sign in to comment.