You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "cshannon (via GitHub)" <gi...@apache.org> on 2023/09/01 14:15:49 UTC
[GitHub] [accumulo] cshannon commented on a diff in pull request #3728: No chop and no split deletions
cshannon commented on code in PR #3728:
URL: https://github.com/apache/accumulo/pull/3728#discussion_r1313085777
##########
server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java:
##########
@@ -669,8 +671,97 @@ private void updateMergeState(Map<TableId,MergeStats> mergeStatsCache) {
}
}
+ private Text getDeletionStartRow(MergeInfo info) throws AccumuloException {
+ // Find the first tablet in the deletion range and check if it was fenced
+ // If the tablet has been fenced we need to keep it as there is still valid
+ // data and we don't want to delete it
+ Text deletionStartRow = info.getExtent().prevEndRow();
+ if (deletionStartRow != null) {
+ Manager.log.trace("Finding tablet that contains the start row {} for deletion",
+ deletionStartRow);
+ KeyExtent firstTablet =
+ loadTabletMetadata(info.getExtent().tableId(), deletionStartRow, ColumnType.PREV_ROW)
+ .map(TabletMetadata::getExtent).orElse(null);
+ // If needsFencingForDeletion() is true then this tablet was previously fenced
+ // so we need to keep it and not delete the tablet. Skip to the next highest
+ // tablet after this one if it exists
+ if (firstTablet != null && needsFencingForDeletion(info, firstTablet)) {
Review Comment:
You are right, this check is not needed, it was just force of habit of checking for null and I will get rid of it. I can also get rid of it for looking up the last tablet, something should always return since it's using the overlapping() method for looking up tablets so rows should always map to something.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org