keith-turner commented on code in PR #5187: URL: https://github.com/apache/accumulo/pull/5187#discussion_r1894217008
########## core/src/main/java/org/apache/accumulo/core/client/admin/TabletMergeability.java: ########## @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.accumulo.core.client.admin; + +import java.io.Serializable; +import java.time.Duration; +import java.util.Objects; + +import com.google.common.base.Preconditions; + +public class TabletMergeability implements Serializable { + private static final long serialVersionUID = 1L; + + public static final TabletMergeability NEVER = new TabletMergeability(Duration.ofNanos(-1)); + public static final TabletMergeability NOW = new TabletMergeability(Duration.ofNanos(0)); Review Comment: ```suggestion public static final TabletMergeability NOW = new TabletMergeability(Duration.ZERO); ``` ########## core/src/main/java/org/apache/accumulo/core/metadata/schema/Ample.java: ########## @@ -392,6 +393,8 @@ interface TabletUpdates<T> { T putCloned(); + T putTabletMergeability(TabletMergeability tabletMergeability); Review Comment: Eventually we will need a steady time to evaluate if something should merge. Seems like the steady time should always be set when the mergability is set. Although its only needed when the duration is > 0. The steady time could be encoded in the same columns value. ```suggestion T putTabletMergeability(TabletMergeability tabletMergeability, SteadyTime steadTime); ``` ########## server/manager/src/main/java/org/apache/accumulo/manager/tableOps/merge/MergeTablets.java: ########## @@ -187,6 +187,20 @@ public Repo<Manager> call(FateId fateId, Manager manager) throws Exception { DeleteRows.getMergeTabletAvailability(range, tabletAvailabilities)); tabletMutator.putPrevEndRow(firstTabletMeta.getPrevEndRow()); + // TODO: How should we determine this value this after merging? + // Do we just keep the value that's already in the last tablet in the range? Review Comment: Keeping the one on the last tablet as is makes sense if we think of mergability being set on a split point. So some mergabiity was set on the last split in the past, so need to keep it. The other split points are being merged away, so no longer care about their mergability. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
