keith-turner commented on code in PR #3545:
URL: https://github.com/apache/accumulo/pull/3545#discussion_r1242890593


##########
server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementScanner.java:
##########
@@ -52,9 +59,16 @@ public class TabletManagementScanner implements 
ClosableIterator<TabletManagemen
     // scan over metadata table, looking for tablets in the wrong state based 
on the live servers
     // and online tables
     try {
-      mdScanner = context.createBatchScanner(tableName, Authorizations.EMPTY, 
8);
+      Locations locs = context.tableOperations().locate(tableName, 
ALL_TABLETS_RANGE);

Review Comment:
   This call will clear the metadata location cache, which could impact other 
operations in the manager.  Could scan instead for this information, or maybe 
the impl of locat should scan instead of scanning via clearing the cache. 
Alternatively could use Suppliers.memoizeWithExpiration to not compute the 
numThreads too often.



##########
server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementScanner.java:
##########
@@ -41,6 +47,7 @@
 public class TabletManagementScanner implements 
ClosableIterator<TabletManagement> {
 
   private static final Logger log = 
LoggerFactory.getLogger(TabletManagementScanner.class);
+  private static final Collection<Range> ALL_TABLETS_RANGE = List.of(new 
Range());

Review Comment:
   Might be able to use MetadataSchema.TabletsSection.getRange() to limit this 
to the tablet metadata range.



-- 
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]

Reply via email to