You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/04/05 00:11:08 UTC
[GitHub] [accumulo] keith-turner commented on a diff in pull request #2422: Implementation of Scan Servers.
keith-turner commented on code in PR #2422:
URL: https://github.com/apache/accumulo/pull/2422#discussion_r842230716
##########
server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java:
##########
@@ -255,6 +255,8 @@ boolean inSafeMode() {
refs =
Stream.concat(refs, Stream.of(new Reference(tm.getTableId(), tm.getDirName(), true)));
}
+ refs = Stream.concat(refs, getContext().getAmple().getScanServerFileReferences()
Review Comment:
I think this would concat the scan servers refs for each tablet, but not completely sure. I may have fixed this in e33ec17237c758f47bbcc25accf2dfa37b38617a
##########
server/base/src/main/java/org/apache/accumulo/server/util/ScanServerMetadataEntries.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * 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
+ *
+ * http://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.server.util;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.accumulo.core.metadata.ScanServerRefTabletFile;
+import org.apache.accumulo.server.ServerContext;
+import org.apache.accumulo.server.cli.ServerUtilOpts;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ScanServerMetadataEntries {
+
+ private static Logger LOG = LoggerFactory.getLogger(ScanServerMetadataEntries.class);
+
+ public static void clean(ServerContext context) {
+ final Map<String,UUID> scanServers = context.getScanServers();
Review Comment:
I think there is a race condition here where scan servers that start after this call could have their metadata ref entries deleted. I may have fixed this in commit e33ec17237c758f47bbcc25accf2dfa37b38617a in my branch.
--
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