keith-turner commented on code in PR #4668:
URL: https://github.com/apache/accumulo/pull/4668#discussion_r1638777208
##########
server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java:
##########
@@ -876,61 +853,53 @@ private void cancelOfflineTableMigrations(KeyExtent
extent) {
}
}
- private void repairMetadata(Text row) {
- Manager.log.debug("Attempting repair on {}", row);
- // ACCUMULO-2261 if a dying tserver writes a location before its lock
information propagates, it
- // may cause duplicate assignment.
- // Attempt to find the dead server entry and remove it.
+ private void logIncorrectTabletLocations(TabletMetadata tabletMetadata) {
try {
Map<Key,Value> future = new HashMap<>();
Map<Key,Value> assigned = new HashMap<>();
- KeyExtent extent = KeyExtent.fromMetaRow(row);
- String table = AccumuloTable.METADATA.tableName();
- if (extent.isMeta()) {
- table = AccumuloTable.ROOT.tableName();
+ KeyExtent extent = tabletMetadata.getExtent();
+ var level = Ample.DataLevel.of(extent.tableId());
+
+ Stream<? extends Entry<Key,Value>> entries;
+ if (level == Ample.DataLevel.ROOT) {
+ RootTabletMetadata rtm = RootTabletMetadata.read(manager.getContext());
+ entries = rtm.getKeyValues();
+ } else {
+ Scanner scanner =
+ manager.getContext().createScanner(level.metaTable(),
Authorizations.EMPTY);
+ scanner.fetchColumnFamily(CurrentLocationColumnFamily.NAME);
+ scanner.fetchColumnFamily(FutureLocationColumnFamily.NAME);
+ scanner.setRange(new Range(extent.toMetaRow()));
+ entries = scanner.stream();
Review Comment:
changed in
[e0e2e92](https://github.com/apache/accumulo/pull/4668/commits/e0e2e929f95ab95d1f4dd2659dc2822edb9bcd7d)
--
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]