Skip to content

Commit

Permalink
Remove unnecessary read of time column during delete (apache#4008)
Browse files Browse the repository at this point in the history
  • Loading branch information
cshannon committed Dec 2, 2023
1 parent e446776 commit f8cb312
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ private void deleteTablets(MergeInfo info) throws AccumuloException {
KeyExtent extent = info.getExtent();
String targetSystemTable = extent.isMeta() ? RootTable.NAME : MetadataTable.NAME;
Manager.log.debug("Deleting tablets for {}", extent);
MetadataTime metadataTime = null;
KeyExtent followingTablet = null;
if (extent.endRow() != null) {
Key nextExtent = new Key(extent.endRow()).followingKey(PartialKey.ROW);
Expand Down Expand Up @@ -710,8 +709,6 @@ private void deleteTablets(MergeInfo info) throws AccumuloException {
ample.putGcFileAndDirCandidates(extent.tableId(), datafilesAndDirs);
datafilesAndDirs.clear();
}
} else if (ServerColumnFamily.TIME_COLUMN.hasColumns(key)) {
metadataTime = MetadataTime.parse(entry.getValue().toString());
} else if (isTabletAssigned(key)) {
throw new IllegalStateException(
"Tablet " + key.getRow() + " is assigned during a merge!");
Expand Down Expand Up @@ -740,7 +737,7 @@ private void deleteTablets(MergeInfo info) throws AccumuloException {

// If there is another tablet after the delete range then update the prev end row
// of that tablet as all tablets will have been deleted in the delete range.
// If the delete range includes the last tablet in the tablet then we need
// If the delete range includes the last tablet in the table then we need
// to update the last tablet's previous end row as deleteTablets() will keep the
// last tablet and only delete the files as we require at least 1 tablet to exist
final KeyExtent goalTablet;
Expand Down

0 comments on commit f8cb312

Please sign in to comment.